/**
 * ============================================================
 *  Admit Campus – Popup / Modal / Enquiry Form Styles
 *  (popup-form.css)
 * ============================================================
 *  Extracted from the inline <style> in the university page.
 *  Include this CSS file in the <head> of any page that uses
 *  the enquiry popup, privacy/terms modals, or the alert card.
 *
 *  Requires:  The page must load Font Awesome 6 for icons.
 * ============================================================
 */


/* ===== CSS VARIABLES (fallback — will inherit from :root on the main page) ===== */
:root {
    --primary: #4a6bff;
    --secondary: #ff6b6b;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gradient: linear-gradient(135deg, #4a6bff 0%, #ff6b6b 100%);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}


/* ===== MODAL OVERLAY ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--radius);
    max-width: 800px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlideIn 0.35s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    color: var(--dark);
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    background: #fee2e2;
    color: #e53e3e;
}

.modal h2 {
    margin-bottom: 20px;
    color: var(--primary);
}

/* ===== ENQUIRY BOX (popup form) ===== */
.enquiry-box {
    max-width: 520px;
    width: 92%;
    text-align: left;
    padding: 35px 30px;
    border-radius: 12px;
}

.enquiry-box form {
    display: flex;
    flex-direction: column;
}

.form-subtitle {
    font-size: 14px;
    margin-bottom: 22px;
    color: #777;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #2d3748;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 107, 255, 0.1);
    outline: none;
}

.form-group input:invalid:not(:placeholder-shown) {
    border-color: #e53e3e;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #38a169;
}

/* Turnstile (Cloudflare CAPTCHA) */
.turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin: 5px 0;
}

.turnstile-wrapper .cf-turnstile {
    max-width: 100%;
}

/* Checkbox area */
.checkbox-area {
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: start;
    gap: 12px;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
}

.checkbox-area input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-area label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    color: #4a5568;
}

.checkbox-area a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.checkbox-area a:hover {
    color: var(--secondary);
}

/* Submit button */
.full-btn {
    width: 100%;
    margin-top: 18px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--gradient);
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== MODERN ALERT (replaces browser alert()) ===== */
.modern-alert {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.alert-card {
    background: #ffffff;
    padding: 30px 28px;
    border-radius: 12px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease;
}

.alert-card .alert-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.alert-card .alert-icon.success {
    color: #38a169;
}

.alert-card .alert-icon.error {
    color: #e53e3e;
}

.alert-card p {
    margin-bottom: 18px;
    font-size: 15px;
    line-height: 1.6;
    color: #2d3748;
}

/* ===== HEADER ENQUIRY BUTTON ===== */
.admcls-enquiry-btn {
    background-color: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
}

.admcls-enquiry-btn:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    color: white;
}

/* ===== OVERLAY (shared with mobile nav) ===== */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== PRIVACY / TERMS MODAL SPECIFICS ===== */
.modal-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a2a6c;
    margin: 18px 0 8px;
}

.modal-content ul {
    margin: 8px 0 12px 20px;
    line-height: 1.8;
    color: #4a5568;
}

.modal-content p {
    color: #4a5568;
    line-height: 1.7;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 24px 20px;
        max-width: 95%;
    }

    .enquiry-box {
        padding: 25px 20px;
    }

    .form-group input {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .enquiry-box {
        padding: 22px 16px;
    }

    .modal-content {
        margin: 8% auto;
        padding: 20px 16px;
    }

    .checkbox-area {
        font-size: 12px;
    }

    #agree + label {
        line-height: 2.0;
    }

    .alert-card {
        padding: 24px 20px;
    }
}