/**
 * ba-pricing.css — Cennik pakietów kredytów [ba_cennik]
 * BA_v7 — Majster AI
 */

/* ===== GRID ===== */
.ba-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin: 40px 0 20px;
    align-items: end;
}

@media (max-width: 900px) {
    .ba-pricing-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== KARTA — bazowa ===== */
.ba-pricing-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08), 0 0 0 1px #e4e7ec;
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.ba-pricing-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 0 0 1px #d0d5dd;
    transform: translateY(-4px);
}

/* ===== KARTA — popularna (wyróżniona) ===== */
.ba-pricing-card--popular {
    box-shadow: 0 8px 40px rgba(37,99,235,0.22), 0 0 0 2px #2563eb;
    transform: translateY(-8px);
    z-index: 2;
}

.ba-pricing-card--popular:hover {
    box-shadow: 0 16px 48px rgba(37,99,235,0.28), 0 0 0 2px #1d4ed8;
    transform: translateY(-12px);
}

/* ===== BADGE "Popularny" ===== */
.ba-pricing-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(37,99,235,0.35);
}

/* ===== HEADER — kolorowy pasek na górze karty ===== */
.ba-pricing-header {
    text-align: center;
    padding: 28px 24px 24px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

/* Karta 1 (BASIC) — jasny nagłówek (default jak wyżej) */
.ba-pricing-grid > .ba-pricing-card:nth-child(1) .ba-pricing-header {
    background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 100%);
    border-bottom: 1px solid #dde3ec;
}

/* Karta 2 (STANDARD/POPULAR) — niebieski nagłówek */
.ba-pricing-grid > .ba-pricing-card:nth-child(2) .ba-pricing-header,
.ba-pricing-card--popular .ba-pricing-header {
    background: linear-gradient(145deg, #2563eb 0%, #1d4ed8 100%);
    border-bottom: none;
    padding-top: 36px;
}

/* Karta 3 (PRO) — ciemny nagłówek */
.ba-pricing-grid > .ba-pricing-card:nth-child(3) .ba-pricing-header {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 1px solid #334155;
}

/* STANDARD — biały tekst */
.ba-pricing-card--popular .ba-pricing-name,
.ba-pricing-grid > .ba-pricing-card:nth-child(2) .ba-pricing-name {
    color: rgba(255,255,255,0.85);
}

.ba-pricing-card--popular .ba-pricing-amount,
.ba-pricing-grid > .ba-pricing-card:nth-child(2) .ba-pricing-amount {
    color: #ffffff;
}

.ba-pricing-card--popular .ba-pricing-per-credit,
.ba-pricing-grid > .ba-pricing-card:nth-child(2) .ba-pricing-per-credit {
    color: rgba(255,255,255,0.72);
}

/* PRO — jasny tekst */
.ba-pricing-grid > .ba-pricing-card:nth-child(3) .ba-pricing-name {
    color: #cbd5e1;
}

.ba-pricing-grid > .ba-pricing-card:nth-child(3) .ba-pricing-amount {
    color: #f1f5f9;
}

.ba-pricing-grid > .ba-pricing-card:nth-child(3) .ba-pricing-per-credit {
    color: #94a3b8;
}

/* ===== NAZWA PLANU ===== */
.ba-pricing-name {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin: 0 0 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

/* ===== CENA ===== */
.ba-pricing-amount {
    font-size: 48px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    letter-spacing: -0.02em;
}

.ba-pricing-amount span {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0;
}

.ba-pricing-per-credit {
    font-size: 13px;
    color: #6b7280;
    margin: 8px 0 0;
}

/* ===== LISTA CECH ===== */
.ba-pricing-features {
    list-style: none;
    margin: 0;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    border-bottom: 1px solid #f1f5f9;
}

.ba-pricing-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    line-height: 1.45;
}

.ba-pricing-feature--no {
    color: #9ca3af;
}

.ba-pricing-feature-icon {
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-top: 1px;
}

.ba-pricing-feature--yes .ba-pricing-feature-icon {
    color: #16a34a;
    background: #dcfce7;
}

.ba-pricing-feature--no .ba-pricing-feature-icon {
    color: #d1d5db;
    background: #f3f4f6;
}

/* ===== STOPKA Z PRZYCISKIEM ===== */
.ba-pricing-footer {
    padding: 20px 24px 24px;
    text-align: center;
}

.ba-pricing-btn {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 2px solid #2563eb;
    color: #2563eb;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.01em;
}

.ba-pricing-btn:hover {
    background: #eff6ff;
    color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
    text-decoration: none;
}

.ba-pricing-btn--primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(37,99,235,0.30);
}

.ba-pricing-btn--primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    color: #fff;
    box-shadow: 0 5px 16px rgba(37,99,235,0.40);
}

.ba-pricing-card--popular .ba-pricing-btn--primary {
    background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%);
    color: #1d4ed8;
    border: 2px solid rgba(255,255,255,0.6);
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

.ba-pricing-card--popular .ba-pricing-btn--primary:hover {
    background: #fff;
    color: #1e40af;
    box-shadow: 0 5px 16px rgba(0,0,0,0.18);
}

.ba-pricing-btn--disabled {
    opacity: 0.40;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #d1d5db;
    color: #9ca3af;
}

/* ====================================================================
   2E — UI płatności: [ba_wycena_payment] / [ba_weryfikacja_payment]
   ==================================================================== */

/* ----- Główny kontener ----- */
.ba-payment-box {
    border-radius: 14px;
    padding: 28px 24px;
    margin: 24px 0;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ----- Wariant A: gość ----- */
.ba-payment-box--guest {
    background: #f9fafb;
    border: 2px solid #e4e7ec;
}

.ba-payment-columns {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ba-payment-col {
    flex: 1;
    text-align: center;
}

.ba-payment-col h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 14px;
}

.ba-payment-divider {
    display: flex;
    align-items: center;
    color: #9ca3af;
    font-size: 14px;
    padding: 0 8px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .ba-payment-columns {
        flex-direction: column;
    }
    .ba-payment-divider {
        padding: 8px 0;
    }
}

/* ----- Wariant B: ma kredyty — zielone tło ----- */
.ba-payment-box--success {
    background: #f0fdf4;
    border: 2px solid #16a34a;
    text-align: center;
}

/* ----- Wariant D: po zakupie ----- */
.ba-payment-box--payment-ok {
    margin-bottom: 8px;
}

.ba-payment-check {
    font-size: 32px;
    color: #16a34a;
    display: block;
    margin-bottom: 8px;
}

.ba-payment-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
}

.ba-payment-note {
    font-size: 13px;
    color: #6b7280;
    margin: 10px 0 0;
}

/* ----- Wariant C: brak kredytów — szare tło ----- */
.ba-payment-box--locked {
    background: #f9fafb;
    border: 2px solid #e4e7ec;
    text-align: center;
}

.ba-payment-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 20px;
}

/* ----- Grid kompaktowy 3 pakiety ----- */
.ba-package-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0;
    align-items: start;
}

@media (max-width: 700px) {
    .ba-package-grid-compact {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ----- Karta kompaktowa ----- */
.ba-package-card-compact {
    position: relative;
    background: #fff;
    border: 2px solid #e4e7ec;
    border-radius: 10px;
    padding: 20px 16px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ba-package-card-compact:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}

.ba-package-card-compact.featured {
    border-color: #2563eb;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.16);
}

.ba-pcc-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.ba-pcc-credits {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

.ba-pcc-price {
    font-size: 28px;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
}

.ba-pcc-price span {
    font-size: 16px;
    font-weight: 600;
}

/* ----- Przyciski w payment box ----- */
.ba-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    border: 2px solid transparent;
}

.ba-btn--primary {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.ba-btn--primary:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

.ba-btn--outline {
    background: #fff;
    color: #2563eb;
    border-color: #2563eb;
}

.ba-btn--outline:hover {
    background: #eff6ff;
    color: #1d4ed8;
    text-decoration: none;
}

.ba-btn--ghost {
    background: transparent;
    color: #6b7280;
    border-color: #d1d5db;
}

.ba-btn--ghost:hover {
    background: #f9fafb;
    color: #374151;
    text-decoration: none;
}

.ba-btn--large {
    padding: 13px 30px;
    font-size: 16px;
}

.ba-btn--sm {
    padding: 7px 14px;
    font-size: 13px;
    height: 32px;
    line-height: 1;
}

.ba-btn--block {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* ----- Stopka zaufania ----- */
.ba-payment-trust {
    font-size: 13px;
    color: #6b7280;
    margin: 12px 0 0;
}

/* ====================================================================
   Komunikaty inline płatności (ba-payment.js)
   ==================================================================== */
.ba-payment-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin: 0 0 16px;
}

.ba-payment-notice--cancelled {
    background: #fef9c3;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ba-payment-notice--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ===== LOCK BOX (gość niezalogowany) ===== */
.ba-lock-box {
    border: 2px dashed #d1d5db;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    max-width: 580px;
    margin: 32px auto;
}
.ba-lock-box__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.ba-lock-box__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111827;
}
.ba-lock-box__subtitle {
    color: #6b7280;
    margin-bottom: 28px;
    font-size: 0.95rem;
}
.ba-lock-box__buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
