/* ==========================================================================
   GRAFINO PRICING / PAKETLER — hem müşteri paneli (app.php kabuğu) hem
   herkese açık (packages-public.php) sayfası tarafından paylaşılır.
   grafino-base.css token'larını kullanır, yeni renk sistemi icat edilmez.
   ========================================================================== */

.g-pricing-hero {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--g-space-10);
}
.g-pricing-hero h1 {
    font-size: clamp(26px, 3.4vw, 34px);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 var(--g-space-3);
    color: var(--g-text-main);
}
.g-pricing-hero p {
    font-size: 15.5px;
    color: var(--g-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* --- Aylık/Yıllık toggle --- */
.g-billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--g-space-3);
    background: var(--g-bg-surface);
    border: 1px solid var(--g-border-color);
    border-radius: var(--g-radius-pill);
    padding: 6px 8px;
    margin: var(--g-space-6) auto 0;
    box-shadow: var(--g-shadow-sm);
}
.g-billing-toggle-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--g-text-muted);
    padding: 0 var(--g-space-2);
    cursor: pointer;
    user-select: none;
    transition: color var(--g-trans-fast, .15s);
}
.g-billing-toggle-label.active { color: var(--g-text-main); }
.g-billing-toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: var(--g-radius-pill);
    background: var(--g-neutral-200);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--g-trans-fast, .15s);
}
.g-billing-toggle-switch.is-yearly { background: var(--g-primary-500); }
.g-billing-toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--g-shadow-sm);
    transition: transform var(--g-trans-fast, .15s);
}
.g-billing-toggle-switch.is-yearly::after { transform: translateX(20px); }
.g-billing-save-badge {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--g-success-600);
    background: var(--g-success-50);
    border: 1px solid var(--g-success-100);
    padding: 2px 9px;
    border-radius: var(--g-radius-pill);
}

/* --- Paket kartları --- */
.g-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--g-space-6);
    align-items: stretch;
    margin: var(--g-space-10) 0;
}
.g-pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--g-bg-surface);
    border: 1px solid var(--g-border-color);
    border-radius: var(--g-radius-xl);
    padding: var(--g-space-6);
    transition: transform var(--g-trans-fast, .15s), box-shadow var(--g-trans-fast, .15s);
}
.g-pricing-card:hover { transform: translateY(-2px); box-shadow: var(--g-shadow-md); }
.g-pricing-card.is-recommended {
    border-color: var(--g-primary-300);
    box-shadow: 0 0 0 1px var(--g-primary-200), var(--g-shadow-lg);
}
.g-pricing-card.is-current {
    border-color: var(--g-success-500);
    background: linear-gradient(180deg, var(--g-success-50) 0%, var(--g-bg-surface) 90px);
}
.g-pricing-ribbon {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    padding: 4px 14px;
    border-radius: var(--g-radius-pill);
    white-space: nowrap;
    box-shadow: var(--g-shadow-sm);
}
.g-pricing-ribbon.g-ribbon-popular { background: var(--g-primary-600); color: #fff; }
.g-pricing-ribbon.g-ribbon-recommended { background: var(--g-neutral-900); color: #fff; }
.g-pricing-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--g-success-700);
    background: var(--g-success-100);
    border: 1px solid var(--g-success-500);
    padding: 4px 11px;
    border-radius: var(--g-radius-pill);
    margin-bottom: var(--g-space-4);
    align-self: flex-start;
}
.g-pricing-card-name {
    font-size: 19px;
    font-weight: 800;
    color: var(--g-text-main);
    margin: 0 0 var(--g-space-2);
}
.g-pricing-card-desc {
    font-size: 13.5px;
    color: var(--g-text-muted);
    line-height: 1.5;
    margin: 0 0 var(--g-space-5);
    min-height: 38px;
}
.g-pricing-price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: var(--g-space-5);
}
.g-pricing-price .amount {
    font-size: 34px;
    font-weight: 800;
    color: var(--g-text-main);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.g-pricing-price .period {
    font-size: 13.5px;
    color: var(--g-text-muted);
    font-weight: 600;
}
.g-pricing-features {
    list-style: none;
    margin: 0 0 var(--g-space-6);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.g-pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    color: var(--g-text-main);
    line-height: 1.45;
}
.g-pricing-features li svg {
    width: 16px; height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--g-success-600);
}
.g-pricing-card-cta { margin-top: auto; }
.g-pricing-card-cta .g-btn { width: 100%; justify-content: center; }

/* --- Kullanım özeti (giriş yapılmış müşteri, aktif paket kartında) --- */
.g-pricing-usage { margin-top: var(--g-space-5); padding-top: var(--g-space-5); border-top: 1px solid var(--g-border-color); }
.g-pricing-usage-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--g-text-muted); margin-bottom: 4px; }
.g-pricing-usage-bar { height: 5px; border-radius: 99px; background: var(--g-bg-surface-muted); overflow: hidden; margin-bottom: 10px; }
.g-pricing-usage-bar > div { height: 100%; background: var(--g-success-500); }
.g-pricing-usage-bar.is-warn > div { background: var(--g-warning-500); }

/* --- Karşılaştırma tablosu --- */
.g-pricing-compare { margin-top: var(--g-space-12); }
.g-pricing-compare h2 {
    font-size: 21px; font-weight: 800; text-align: center; margin: 0 0 var(--g-space-6);
    color: var(--g-text-main);
}
.g-pricing-compare-wrap { overflow-x: auto; border: 1px solid var(--g-border-color); border-radius: var(--g-radius-lg); background: var(--g-bg-surface); }
.g-pricing-compare-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
.g-pricing-compare-table th, .g-pricing-compare-table td { padding: 12px 16px; text-align: center; border-bottom: 1px solid var(--g-border-color); white-space: nowrap; }
.g-pricing-compare-table th:first-child, .g-pricing-compare-table td:first-child { text-align: left; white-space: normal; color: var(--g-text-main); font-weight: 600; }
.g-pricing-compare-table thead th { background: var(--g-bg-surface-muted); font-weight: 700; color: var(--g-text-main); font-size: 12.5px; }
.g-pricing-compare-table thead th.is-current-col { color: var(--g-success-700); }
.g-pricing-compare-table tbody tr:last-child td { border-bottom: none; }
.g-pricing-compare-table .g-check { color: var(--g-success-600); }
.g-pricing-compare-table .g-dash { color: var(--g-text-subtle); }

@media (max-width: 640px) {
    .g-pricing-grid { grid-template-columns: 1fr; }
    .g-pricing-card { padding: var(--g-space-5); }
}
