/*
 * =============================================================
 * SFPA CUSTOM THEME COMPONENTS
 * =============================================================
 * Consolidated styles for Modals, Buttons, and Banners.
 * Replaces scattered styles in register-desktop.css, blog-custom.css, etc.
 */

/* =========================================================================
   GLOBAL MODAL STYLES (Applies to Desktop & Mobile)
   ========================================================================= */

/* Popup message for form validation */
.popup-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    z-index: 1000;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* SUCCESS MODAL - Centered and "More Appearing" */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dimmed background */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.success-modal-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s ease;
    position: relative;
}

.success-modal-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
}

.success-modal-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.success-modal-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.success-modal-close {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.success-modal-close:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =========================================================================
   SUCCESS MODAL - MOBILE OVERRIDES
   ========================================================================= */
@media (max-width: 767px) {
    .success-modal-content {
        padding: 30px 20px !important;
        width: 95% !important;
        max-width: 95% !important;
    }

    .success-modal-icon {
        font-size: 50px !important;
        margin-bottom: 15px !important;
    }

    .success-modal-title {
        font-size: 24px !important;
    }

    .success-modal-message {
        font-size: 16px !important;
        margin-bottom: 25px !important;
    }

    .success-modal-close {
        padding: 15px 30px !important; /* Larger touch target */
        font-size: 16px !important;
        width: 100% !important; /* Full width button on mobile */
        display: block !important;
    }

    /* Ensure it sits on top of everything on mobile */
    .success-modal-overlay {
        z-index: 100000 !important; /* Higher than everything */
    }
}

/* =========================================================================
   LAYOUT BANNER & BUTTONS
   Register for Open House & Language Switcher
   ========================================================================= */

.banner {
    /* Minimal padding to preserve height constraint */
    padding: 10px 0;
}

.banner-title {
    margin: 0;
    line-height: 1.2;
}

.banner-title a,
.lang-button {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff !important; /* White Text */
    text-decoration: none !important;
    position: relative;
    border-radius: 50px; /* Pill shape */
    transition: all 0.3s ease;
    background-color: #05A3E8 !important; /* Brand Blue Background */
    display: inline-block;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Specific styles for Banner Button */
.banner-title a {
    font-size: 24px !important;
    padding: 10px 30px;
    border: 2px solid #f1b434 !important; /* Gold Border */
}

/* Specific styles for Language Button */
.lang-button {
    font-size: 14px !important;
    letter-spacing: 1px;
    padding: 6px 15px;
    border: 2px solid #f1b434 !important; /* Gold */
}

/* HOVER STATES */
.banner-title a:hover {
    background-color: #004d99; /* Darker Blue */
    border-color: #FF6B2B !important; /* Orange Border */
    border-width: 2px !important; /* Keep border constant to prevent jitter */
    color: #ffffff !important;
    /* Use inset shadow to simulate thicker border (2px border + 2px inset = 4px visual) */
    box-shadow: 0 6px 20px rgba(0, 77, 153, 0.3), inset 0 0 0 2px #FF6B2B;
    padding: 10px 30px; /* Keep padding constant */
}

.lang-button:hover {
    background-color: #004d99; /* Darker Blue */
    border-color: #FF6B2B !important; /* Orange Hover */
    border-width: 2px !important; /* Keep border constant */
    color: #ffffff !important;
    /* Use inset shadow to simulate thicker border (2px border + 1px inset = 3px visual) */
    box-shadow: 0 4px 10px rgba(0, 77, 153, 0.3), inset 0 0 0 1px #FF6B2B;
    padding: 6px 15px; /* Keep padding constant */
}

/* =========================================================================
   REGISTER BANNER - MOBILE STYLES
   ========================================================================= */
@media (max-width: 767px) {
    /* Use stronger selector to override global styles if needed */
    section.banner .banner-title a {
        font-size: 12px !important; /* Reduced size */
        padding: 5px 12px !important; /* Reduced padding */
        border-width: 2px !important; /* Thinner border */
        border-color: #FF6B2B !important; /* Orange like hover (Highlight by default) */
        background-color: #05A3E8 !important; /* Brand Blue */
        color: #ffffff !important;
        letter-spacing: 1px !important;
        display: inline-block !important;
        margin: 0 auto !important; /* Ensure centering */
    }
}
