/* ==============================
   MATH CAPTCHA STYLES
   ============================== */
.captcha-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm, 6px);
    padding: 10px 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.captcha-header {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #000000; /* Black text for popup forms */
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 8px;
    font-family: var(--font-heading), sans-serif;
    letter-spacing: 0.5px;
}

.captcha-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.captcha-question-box {
    background: #1e2022;
    color: #ffffff;
    font-family: var(--font-heading), sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    padding: 6px 12px;
    border-radius: 4px;
    flex-grow: 1;
    letter-spacing: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 34px;
    box-sizing: border-box;
}

.captcha-refresh-btn {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast, 0.2s), border-color var(--transition-fast, 0.2s);
    color: #495057;
    font-size: 0.9rem;
    padding: 0;
    flex-shrink: 0;
    box-sizing: border-box;
}

.captcha-refresh-btn:hover {
    background: #dde1e5;
    border-color: #adb5bd;
    color: #212529;
}

.captcha-input-group {
    position: relative;
    width: 100%;
}

.captcha-answer-input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1.5px solid #ced4da !important;
    border-radius: var(--radius-sm, 6px) !important;
    font-size: 0.88rem !important;
    text-align: center !important;
    color: #212529 !important;
    background: #ffffff !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.captcha-answer-input:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1) !important;
}

.captcha-answer-input::placeholder {
    color: #adb5bd !important;
}

/* Customizations for Hero Form Math Card */
.hero-form-card .captcha-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

.hero-form-card .captcha-header {
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-form-card .captcha-answer-input {
    background: rgba(15, 20, 25, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--white) !important;
}

.hero-form-card .captcha-answer-input:focus {
    border-color: var(--gold-light) !important;
    box-shadow: 0 0 0 3px rgba(102, 209, 255, 0.15) !important;
}

/* Mobile optimizations to make popup inquire form compact */
@media (max-width: 768px) {
    /* Modal content and spacing reduction */
    .modal-content {
        padding: 18px 16px !important;
    }
    
    /* Keep phone and email side-by-side on mobile inside inquiry modal */
    #inquiry_modal .form-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    
    .modal-header {
        margin-bottom: 10px !important;
    }
    
    .modal-header h3 {
        font-size: 1.1rem !important;
    }
    
    .modal-header p {
        font-size: 0.78rem !important;
    }
    
    .modal .form-group {
        margin-bottom: 8px !important;
    }
    
    .modal .form-group label {
        font-size: 0.76rem !important;
        margin-bottom: 2px !important;
    }
    
    .modal .form-group input,
    .modal .form-group textarea {
        padding: 8px 10px !important;
        font-size: 0.82rem !important;
    }
    
    .modal .btn-lg {
        padding: 10px 16px !important;
        font-size: 0.88rem !important;
    }
    
    /* Captcha card compacting inside modal */
    .modal-content .captcha-card {
        padding: 8px 10px !important;
        margin-bottom: 10px !important;
    }
    
    .modal-content .captcha-header {
        font-size: 0.8rem !important;
        padding-bottom: 4px !important;
        margin-bottom: 6px !important;
    }
    
    .modal-content .captcha-row {
        margin-bottom: 6px !important;
        gap: 6px !important;
    }
    
    .modal-content .captcha-question-box {
        font-size: 0.95rem !important;
        height: 30px !important;
        padding: 4px 10px !important;
        border-radius: 4px !important;
    }
    
    .modal-content .captcha-refresh-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 0.8rem !important;
        border-radius: 4px !important;
    }
    
    .modal-content .captcha-answer-input {
        padding: 6px 10px !important;
        font-size: 0.82rem !important;
        border-radius: 4px !important;
    }
}
