/* ===============================
   Pricing Toggle Wrapper
================================ */

.pricing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
}

/* ===============================
   Toggle Buttons
================================ */

.toggle-btn {
    appearance: none;
    border: none;
    background: transparent;
    padding: 0.55rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    border-radius: 999px;
    position: relative;
    transition: 
        background-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}

/* Active state */
.toggle-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

/* Hover (subtle, calm) */
.toggle-btn:not(.active):hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.04);
}

/* ===============================
   Data Billing Attribute
================================ */

.toggle-btn[data-billing] {
    letter-spacing: 0.2px;
}

/* ===============================
   Accessibility Focus
================================ */

.toggle-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* ===============================
   Mobile Refinement
================================ */

@media (max-width: 480px) {
    .toggle-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
/* =====================================
   SECTION TITLE
===================================== */

h2 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #020617;
    text-align: center;
    margin-bottom: 3rem;

    opacity: 0;
    transform: translateY(14px);
    animation: titleReveal 0.6s ease-out forwards;
}

/* =====================================
   TABLE WRAPPER
===================================== */

.comparison-table {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.06);
    overflow-x: auto;

    opacity: 0;
    transform: translateY(18px);
    animation: tableReveal 0.7s ease-out forwards;
    animation-delay: 0.15s;
}

/* =====================================
   TABLE BASE
===================================== */

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    font-size: 0.95rem;
    color: #334155;
}

/* =====================================
   TABLE HEADER
===================================== */

.comparison-table thead {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: #475569;
}

.comparison-table thead tr {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.35s;
}

/* Sticky header (advanced UX) */
.comparison-table thead tr {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* =====================================
   TABLE BODY
===================================== */

.comparison-table tbody {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.45s;
}

/* =====================================
   TABLE ROWS
===================================== */

.comparison-table tbody tr {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;

    opacity: 0;
    transform: translateY(6px);
    animation: rowReveal 0.4s ease-out forwards;
}

/* staggered animation */
.comparison-table tbody tr:nth-child(1) { animation-delay: 0.55s; }
.comparison-table tbody tr:nth-child(2) { animation-delay: 0.65s; }
.comparison-table tbody tr:nth-child(3) { animation-delay: 0.75s; }
.comparison-table tbody tr:nth-child(4) { animation-delay: 0.85s; }
.comparison-table tbody tr:nth-child(5) { animation-delay: 0.95s; }
.comparison-table tbody tr:nth-child(6) { animation-delay: 1.05s; }
.comparison-table tbody tr:nth-child(7) { animation-delay: 1.15s; }

/* Hover highlight (desktop only) */
@media (hover: hover) {
    .comparison-table tbody tr:hover {
        background: #f8fafc;
    }
}

/* =====================================
   CELLS (ADVANCED TYPOGRAPHY)
===================================== */

.comparison-table th,
.comparison-table td {
    padding: 1.1rem 1.2rem;
    text-align: center;
    white-space: nowrap;
}

/* Feature column */
.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: #020617;
}

/* =====================================
   FEATURED PLAN (Professional)
===================================== */

/* Highlight middle plan */
.comparison-table th:nth-child(3),
.comparison-table td:nth-child(3) {
    background: linear-gradient(
        180deg,
        rgba(37, 99, 235, 0.06),
        rgba(37, 99, 235, 0.02)
    );
    font-weight: 600;
    color: #0f172a;
}

/* =====================================
   ICON-LIKE CHECK STYLING
===================================== */

.comparison-table td {
    font-weight: 500;
}

.comparison-table td:contains("✓") {
    color: #16a34a;
}

/* =====================================
   ANIMATIONS
===================================== */

@keyframes titleReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tableReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes rowReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================
   RESPONSIVE REFINEMENT
===================================== */

@media (max-width: 768px) {
    h2 {
        font-size: 1.75rem;
    }

    .comparison-table table {
        font-size: 0.9rem;
    }
}
/* =====================================
   PRICE DISPLAY
===================================== */

.price-display {
    display: flex;
    align-items: flex-end;
    gap: 0.4rem;
    margin: 1.6rem 0 0.8rem;

    opacity: 0;
    transform: translateY(12px);
    animation: priceReveal 0.6s ease-out forwards;
}

/* =====================================
   PRICE TEXT
===================================== */

.price {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #020617;
    line-height: 1;
}

/* Monthly / Annual smooth switch */
.monthly-price,
.annual-price {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.annual-price {
    opacity: 0;
    transform: translateY(4px);
}

.monthly-price {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================
   DESCRIPTION TEXT
===================================== */

.description,
p.description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1.6rem;

    opacity: 0;
    transform: translateY(8px);
    animation: textReveal 0.5s ease-out forwards;
    animation-delay: 0.15s;
}

/* =====================================
   FEATURES LIST
===================================== */

.features-list,
ul.features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.8rem;

    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.25s;
}

/* =====================================
   FEATURE ITEMS
===================================== */

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 0.6rem;

    opacity: 0;
    transform: translateX(-6px);
    animation: listItemReveal 0.4s ease-out forwards;
}

/* stagger list */
.features-list li:nth-child(1) { animation-delay: 0.35s; }
.features-list li:nth-child(2) { animation-delay: 0.45s; }
.features-list li:nth-child(3) { animation-delay: 0.55s; }
.features-list li:nth-child(4) { animation-delay: 0.65s; }
.features-list li:nth-child(5) { animation-delay: 0.75s; }
.features-list li:nth-child(6) { animation-delay: 0.85s; }

/* soften unavailable features */
.features-list li:has(span),
.features-list li:contains("✗") {
    color: #94a3b8;
}

/* =====================================
   ANIMATIONS
===================================== */

@keyframes priceReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes listItemReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =====================================
   RESPONSIVE REFINEMENT
===================================== */

@media (max-width: 768px) {
    .price {
        font-size: 2rem;
    }

    .description {
        font-size: 0.9rem;
    }

    .features-list li {
        font-size: 0.88rem;
    }
}
