/* 
Plugin Name: Antigravity Customizations
Description: Custom styles for Typography, Mission Section, Login, and Newsletter.
*/

/* =========================================
   CSS Variables
   ========================================= */
:root {
    --ag-color-primary: #0066cc;
    --ag-color-green: #00D084;
    --ag-color-dark: #1a1a1a;
    --ag-color-gray: #f4f6f8;
    --ag-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --ag-focus-ring: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* =========================================
   "Our Mission" Section UI Refresh
   ========================================= */
/* Targeting the specific container identified */
.gb-container-fb0743df .gb-grid-column {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Make the columns look like cards */
.gb-container-fb0743df .gb-grid-column>.gb-container {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    /* Equal height */
    text-align: center;
    transition: all 0.3s ease;
}

/* Hover effect */
.gb-container-fb0743df .gb-grid-column:hover>.gb-container {
    transform: translateY(-5px);
    box-shadow: var(--ag-shadow-soft);
}

/* Icon styling tweaks (Assuming GB uses SVGs or Icon blocks) */
.gb-container-fb0743df .gb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--ag-color-gray);
    border-radius: 50%;
    margin-bottom: 20px;
    color: var(--ag-color-primary);
}

.gb-container-fb0743df .gb-headline {
    font-size: 1.25rem !important;
    margin-bottom: 10px;
}

/* =========================================
   3. Login & Register Page Improvements (Ultimate Member)
   ========================================= */
/* Wrapper cleanup */
.um-login,
.um-register {
    max-width: 480px;
    margin: 40px auto;
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--ag-shadow-soft);
    border: 1px solid #eee;
}

/* Headings */
.um-header {
    border-bottom: none !important;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.um-header h1,
.um-header .um-title {
    font-size: 2rem !important;
    color: var(--ag-color-dark);
}

/* Inputs */
.um-form input[type=text],
.um-form input[type=password],
.um-form input[type=email],
.um-form input[type=tel],
.um-field-area input {
    border: 2px solid #eaeff2 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    background-color: #fcfcfc !important;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.um-form input:focus {
    border-color: var(--ag-color-primary) !important;
    background-color: #fff !important;
    box-shadow: var(--ag-focus-ring) !important;
}

/* Labels */
.um-field-label label {
    font-weight: 600 !important;
    color: #555 !important;
    font-size: 0.9rem !important;
    margin-bottom: 8px !important;
}

/* Buttons */
.um .um-button,
input[type=submit].um-button {
    background: #111 !important;
    /* Dark modern button */
    color: #fff !important;
    border-radius: 50px !important;
    /* Pill shape */
    padding: 14px 30px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.9rem !important;
    letter-spacing: 0.05em;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
}

.um .um-button:hover {
    background: var(--ag-color-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Links & Secondary Actions */
.um-col-alt-b a,
.um-link-hvr {
    color: #666 !important;
    text-decoration: none !important;
    font-weight: 500;
}

.um-col-alt-b a:hover {
    color: var(--ag-color-primary) !important;
}

/* Contrast Fixes */
.um-field-checkbox-option,
.um-field-radio-option {
    color: #333 !important;
}

/* =========================================
   4. Newsletter Components
   ========================================= */

/* Inline Section (Injected via JS) */
#ag-newsletter-inline {
    background: #f9fafb;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    padding: 60px 20px;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

#ag-newsletter-inline h2 {
    margin-bottom: 10px;
    font-size: 2rem;
}

#ag-newsletter-inline p {
    margin-bottom: 30px;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Form Styles */
.ag-newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.ag-newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.ag-newsletter-input:focus {
    border-color: var(--ag-color-primary);
}

.ag-newsletter-submit {
    background: var(--ag-color-primary);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.ag-newsletter-submit:hover {
    background-color: #004c99;
}

/* Popup Modal Overlay */
#ag-newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#ag-newsletter-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Popup Modal - Centered Design */
#ag-newsletter-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 90%;
    max-width: 550px;
    background: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 0;
    padding: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

#ag-newsletter-popup.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

#ag-newsletter-popup-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 32px !important;
    cursor: pointer;
    color: #fff;
    line-height: 1;
    width: 30px;
    height: 30px;
    padding: 0;
    transition: color 0.2s ease;
    z-index: 10;
}

#ag-newsletter-popup-close:hover {
    color: #000;
}

.popup-header {
    background: #1e73be;
    padding: 30px 40px 30px;
}

.popup-main-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.popup-content {
    padding: 40px 50px 50px;
    background: #fff;
}

.popup-subtitle {
    font-size: 1.4rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.popup-description {
    font-size: 1rem;
    color: #555;
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.popup-cta {
    font-size: 0.95rem;
    color: #777;
    margin: 0 0 30px 0;
    line-height: 1.5;
    font-style: italic;
}

#ag-newsletter-popup .ag-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

#ag-newsletter-popup .ag-newsletter-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    font-size: 1rem;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    text-align: center;
}

#ag-newsletter-popup .ag-newsletter-input:focus {
    border-color: #1e73be;
    background-color: #fff;
}

#ag-newsletter-popup .ag-newsletter-input::placeholder {
    color: #aaa;
}

#ag-newsletter-popup .ag-newsletter-submit {
    width: 100%;
    padding: 18px 30px;
    background: #1e73be;
    color: white;
    border: none;
    border-radius: 0;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

#ag-newsletter-popup .ag-newsletter-submit:hover {
    background: #155a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 115, 190, 0.3);
}

#ag-newsletter-popup .popup-dismiss-link {
    display: inline-block;
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 10px;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

#ag-newsletter-popup .popup-dismiss-link:hover {
    color: #666;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    #ag-newsletter-popup {
        width: 95%;
        max-width: 95%;
    }

    .popup-header {
        padding: 40px 30px 25px;
    }

    .popup-main-title {
        font-size: 2rem;
    }

    .popup-content {
        padding: 30px 25px 40px;
    }

    .popup-subtitle {
        font-size: 1.2rem;
    }

    .popup-description,
    .popup-cta {
        font-size: 0.95rem;
    }
}

/* =========================================
   Shortcode Newsletter Form
   ========================================= */
.ag-newsletter-shortcode {
    background: #f9fafb;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    padding: 40px;
    margin: 30px 0;
    text-align: center;
}

.ag-newsletter-shortcode h3 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.ag-newsletter-shortcode p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 1rem;
}

/* SendFox Form Styling to match Popup Design */
#ag-newsletter-popup .sendfox-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

#ag-newsletter-popup .sendfox-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#ag-newsletter-popup .sendfox-form p {
    margin: 0;
    padding: 0;
}

#ag-newsletter-popup .sendfox-form input[type="email"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    font-size: 1rem;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    text-align: center;
}

#ag-newsletter-popup .sendfox-form input[type="email"]:focus {
    border-color: #1e73be;
}

#ag-newsletter-popup .sendfox-form input[type="email"]::placeholder {
    color: #aaa;
}

#ag-newsletter-popup .sendfox-form button.gb-button.newsletter-button {
    width: 100%;
    padding: 18px 30px;
    background: #1e73be;
    color: white;
    border: none;
    border-radius: 0;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    margin-top: 10px;
    display: inline-block !important;
    /* Changed from inline to inline-block for proper padding/width */
}

#ag-newsletter-popup .sendfox-form button.gb-button.newsletter-button:hover {
    background: #155a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 115, 190, 0.3);
}

#ag-newsletter-popup .sendfox-form input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

#ag-newsletter-popup .sendfox-form label {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

/* Hide label for email wrapper as it is empty */
#ag-newsletter-popup .sendfox-form .email-input-wrapper label {
    display: none;
}

/* Adjust margins for the wrappers */
#ag-newsletter-popup .email-input-wrapper,
#ag-newsletter-popup .submit-button-wrapper {
    width: 100%;
}

/* Shortcode Newsletter Form */
.ag-newsletter-shortcode .ag-newsletter-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.ag-newsletter-shortcode .ag-newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.ag-newsletter-shortcode .ag-newsletter-input:focus {
    border-color: var(--ag-color-primary);
}

.ag-newsletter-shortcode .ag-newsletter-submit {
    background: var(--ag-color-primary);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.ag-newsletter-shortcode .ag-newsletter-submit:hover {
    background-color: #004c99;
}

.ag-newsletter-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    display: none;
}

.ag-newsletter-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.ag-newsletter-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.hidden-by-subscription {
    display: none !important;
}

/* Responsive Shortcode */
@media (max-width: 600px) {
    .ag-newsletter-shortcode {
        padding: 30px 20px;
    }

    .ag-newsletter-shortcode .ag-newsletter-form {
        flex-direction: column;
    }

    .ag-newsletter-shortcode .ag-newsletter-input,
    .ag-newsletter-shortcode .ag-newsletter-submit {
        width: 100%;
    }
}