/**
 * Credits UI — Payment Modal & Credit Display Styles
 * 
 * @package AccessibilityCheckerPro
 * @version 1.0.0
 * @since 3.0.0
 * 
 * Colors from existing design:
 *   #1a2234 — Dark background
 *   #1e5f99 — Primary blue
 *   #dc2626 — Error red
 *   #059669 — Success green
 *   #f59e0b — Warning amber
 */

/* ========================================================================
   MODAL OVERLAY
   ======================================================================== */

.acp-credits-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.acp-credits-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.acp-credits-dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: acpModalIn 0.25s ease-out;
}

@keyframes acpModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.acp-credits-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s;
}

.acp-credits-close:hover {
    color: #1a2234;
}

/* ========================================================================
   MODAL HEADER
   ======================================================================== */

.acp-credits-header {
    text-align: center;
    margin-bottom: 24px;
}

.acp-credits-lock {
    font-size: 36px;
    margin-bottom: 8px;
}

.acp-credits-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a2234;
    margin: 0 0 8px;
}

.acp-credits-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ========================================================================
   PRICING CARDS
   ======================================================================== */

.acp-credits-packages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.acp-pricing-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, transform 0.15s;
    cursor: pointer;
}

.acp-pricing-card:hover {
    border-color: #1e5f99;
    transform: translateY(-2px);
}

.acp-pricing-card.best-value {
    border-color: #1e5f99;
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
}

.acp-pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e5f99;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.acp-pricing-credits {
    font-size: 36px;
    font-weight: 800;
    color: #1a2234;
    line-height: 1;
}

.acp-pricing-label {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 12px;
}

.acp-pricing-price {
    font-size: 20px;
    font-weight: 700;
    color: #1a2234;
    margin-bottom: 4px;
}

.acp-pricing-price small {
    font-size: 13px;
    font-weight: 400;
    color: #94a3b8;
}

.acp-pricing-per {
    font-size: 13px;
    color: #059669;
    font-weight: 600;
    margin-bottom: 16px;
}

.acp-pricing-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #1a2234;
    background: #fff;
    color: #1a2234;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.acp-pricing-btn:hover {
    background: #1a2234;
    color: #fff;
}

.acp-pricing-btn.best-value {
    background: #1e5f99;
    border-color: #1e5f99;
    color: #fff;
}

.acp-pricing-btn.best-value:hover {
    background: #174d7a;
    border-color: #174d7a;
}

.acp-pricing-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================================================
   EMAIL INPUT SECTION
   ======================================================================== */

.acp-credits-email-section {
    margin-bottom: 20px;
}

.acp-credits-email-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.acp-credits-email-row {
    display: flex;
    gap: 8px;
}

#acp-credits-email {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

#acp-credits-email:focus {
    border-color: #1e5f99;
}

.acp-check-balance-btn {
    padding: 10px 16px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.acp-check-balance-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.acp-balance-result {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 0;
}

.acp-credits-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 6px 0 0;
}

/* ========================================================================
   MODAL FOOTER
   ======================================================================== */

.acp-credits-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: #94a3b8;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* ========================================================================
   UPSELL BANNER (POST FREE SCAN)
   ======================================================================== */

.acp-upsell-banner {
    background: linear-gradient(135deg, #f0f7ff, #eff6ff);
    border: 2px solid #1e5f99;
    border-radius: 12px;
    padding: 16px 24px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.acp-upsell-banner > span {
    font-size: 14px;
    color: #1a2234;
    font-weight: 500;
}

.acp-upsell-buttons {
    display: flex;
    gap: 8px;
}

.acp-upsell-btn {
    padding: 8px 20px;
    border: 2px solid #1a2234;
    background: #fff;
    color: #1a2234;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.acp-upsell-btn:hover {
    background: #1a2234;
    color: #fff;
}

.acp-upsell-btn.best-value {
    background: #1e5f99;
    border-color: #1e5f99;
    color: #fff;
}

.acp-upsell-btn.best-value:hover {
    background: #174d7a;
}

/* ========================================================================
   REMAINING BADGE (inline with form)
   ======================================================================== */

.acp-remaining-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    padding: 4px 12px;
    background: #ecfdf5;
    border-radius: 20px;
    margin: 4px 0;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */

@media (max-width: 520px) {
    .acp-credits-dialog {
        padding: 24px 16px;
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
        margin-top: auto;
    }
    
    .acp-credits-packages {
        grid-template-columns: 1fr;
    }
    
    .acp-credits-email-row {
        flex-direction: column;
    }
    
    .acp-upsell-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .acp-upsell-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .acp-upsell-btn {
        width: 100%;
    }
    
    .acp-credits-footer {
        flex-direction: column;
        align-items: center;
    }
}

/* ========================================================================
   CREDIT BAR (above form)
   ======================================================================== */

.acp-credit-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.acp-cb-free {
    background: #ecfdf5;
    border: 1px solid #059669;
    color: #065f46;
}

.acp-cb-credit {
    background: #eff6ff;
    border: 1px solid #1e5f99;
    color: #1e3a5f;
}

.acp-cb-empty {
    background: #fef2f2;
    border: 1px solid #dc2626;
    color: #991b1b;
}

.acp-cb-icon {
    font-size: 16px;
}

.acp-cb-text strong {
    font-weight: 700;
}

.acp-cb-buy {
    margin-left: auto;
    font-weight: 600;
    color: #1e5f99;
    text-decoration: none;
    font-size: 13px;
}

.acp-cb-buy:hover {
    text-decoration: underline;
}