/* ═══════════════════════════════════════════════════════════════════════════
   MSpace Clean Pricing Tables & Tabs (pricing-tables.css)
   Simple, scannable, plain-English fee tables across /pricing and product pages
   ═══════════════════════════════════════════════════════════════════════════ */

.msp-pricing-band {
    background-color: #f4f7fa;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding-block: clamp(3rem, 5vw, 4.5rem);
    color: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: start;
}

.msp-pricing-container {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding-inline: 15px;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .msp-pricing-container {
        padding-inline: 3rem;
    }
}

.msp-pricing-head {
    text-align: center;
    margin-block-end: 1.75rem;
}

.msp-pricing-head h1,
.msp-pricing-head h2 {
    margin: 0 0 0.5rem;
    color: #1e293b;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(1.65rem, 1.2rem + 1.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.msp-pricing-head p {
    margin: 0 auto;
    max-width: 62ch;
    color: #334155;
    font-size: 1.02rem;
    line-height: 1.6;
}

.msp-pricing-head p strong {
    color: #0f172a;
    font-weight: 700;
}

.msp-pricing-highlights {
    margin-block-start: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

.msp-pricing-head-cta {
    margin-block-start: 0.85rem;
    display: flex;
    justify-content: center;
}

.msp-pricing-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.msp-pricing-pill i {
    color: #059669;
}

.msp-pricing-pill-cta {
    background: #0000a0;
    border-color: #0000a0;
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none !important;
    transition: background-color 150ms ease-out, transform 150ms ease-out;
}

.msp-pricing-pill-cta i {
    color: #ffffff;
}

.msp-pricing-pill-cta:hover {
    background: #00007a;
    border-color: #00007a;
    color: #ffffff !important;
}

.msp-pricing-pill-cta:active {
    transform: scale(0.97);
}

/* ── Single-Row Balanced Service Tabs (on /pricing) ── */
.msp-price-tablist-shell {
    margin-block-end: 2rem;
    background: #ffffff;
    border-radius: 0.85rem;
    padding-inline: 0.35rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    border: 1px solid #e2e8f0;
}

.msp-price-tablist {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.15rem;
    scroll-snap-type: inline proximity;
    scroll-padding-inline: 2rem;
    scrollbar-width: thin;
}

.msp-price-tab {
    position: relative;
    flex: 1 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.88rem 0.9rem;
    border: 0;
    background: transparent;
    color: #475569;
    font-family: inherit;
    font-size: 0.89rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    transition: color 150ms ease-out, background-color 150ms ease-out;
}

.msp-price-tab:hover {
    color: #0f172a;
    background-color: #f8fafc;
}

.msp-price-tab[aria-selected="true"] {
    color: #0000a0;
}

.msp-price-tab[aria-selected="true"]::after {
    content: "";
    position: absolute;
    inset: auto 0.6rem 0;
    border-block-end: 3px solid #0000a0;
}

.msp-price-tab:focus-visible {
    outline: 2px solid #0000a0;
    outline-offset: -2px;
    border-radius: 0.5rem;
}

/* Tab panel wrapper: keep styles OFF [role="tabpanel"] so hidden="until-found" leaves zero strip */
.msp-price-panels {
    display: block;
}

.msp-price-panel-inner {
    padding-block-start: 0.25rem;
}

/* ── Section Group Title above each table ── */
.msp-fee-group {
    margin-block-end: 2rem;
}

.msp-fee-group:last-child {
    margin-block-end: 0;
}

.msp-fee-group-title {
    margin: 0 0 0.85rem;
    color: #334155;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.msp-fee-group-sub {
    margin: -0.45rem 0 0.9rem;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ── Clean Rounded Table Card (Competitor-grade simplicity) ── */
.msp-price-table-wrap {
    overflow: auto;
    max-inline-size: 100%;
    container-type: inline-size;
    background: #ffffff;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.07), 0 1px 3px rgba(15, 23, 42, 0.03);
}

.msp-price-table-wrap:focus-visible {
    outline: 2px solid #0000a0;
    outline-offset: 3px;
}

.msp-price-table {
    inline-size: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    color: #334155;
    text-align: start;
}

/* Lock Column 1 to a consistent 30% seam across stacked tables on desktop */
@container (width >= 640px) {
    .msp-price-table {
        table-layout: fixed;
    }

    .msp-price-table thead th:first-child,
    .msp-price-table tbody th:first-child {
        width: 30%;
    }

    /* 3-column tables: 30% Item | 28% Cost | 42% Description */
    .msp-price-table thead th:nth-child(2):nth-last-child(2) {
        width: 28%;
    }

    /* Symmetrical 50/50 centered 2-column rate tables (no empty right void) */
    .msp-price-table.is-2col-centered thead th:first-child,
    .msp-price-table.is-2col-centered tbody th:first-child,
    .msp-price-table.is-2col-centered thead th:last-child,
    .msp-price-table.is-2col-centered tbody td:last-child {
        width: 50%;
    }
}

.msp-fee-group.is-centered .msp-fee-group-title,
.msp-fee-group.is-centered .msp-fee-group-sub {
    text-align: center;
}

.msp-price-table.is-2col-centered thead th,
.msp-price-table.is-2col-centered tbody th,
.msp-price-table.is-2col-centered tbody td {
    text-align: center;
}

/* Center value columns (2..N) on multi-column rate tables */
.msp-price-table.is-centered-cols thead th:not(:first-child),
.msp-price-table.is-centered-cols tbody td {
    text-align: center;
}

.msp-price-table caption {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.msp-price-table thead {
    position: sticky;
    inset-block-start: 0;
    z-index: 1;
}

.msp-price-table thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: start;
}

.msp-price-table thead th:last-child {
    border-right: 0;
}

.msp-price-table tbody th,
.msp-price-table tbody td {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
    vertical-align: middle;
    background: #ffffff;
    overflow-wrap: break-word;
}

.msp-price-table tbody th:last-child,
.msp-price-table tbody td:last-child {
    border-right: 0;
}

.msp-price-table tbody tr:last-child th,
.msp-price-table tbody tr:last-child td {
    border-bottom: 0;
}

.msp-price-table tbody th {
    position: sticky;
    inset-inline-start: 0;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
}

.msp-price-table tbody tr:hover th,
.msp-price-table tbody tr:hover td {
    background: #f8fafc;
}

.msp-price-val {
    font-weight: 700;
    color: #0f172a;
    white-space: normal;
    overflow-wrap: break-word;
}

.msp-price-free {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 700;
}

.msp-price-muted {
    display: inline-block;
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 500;
}

/* Stacked mobile transformation ONLY for wide multi-column rate tables (.is-multicol) */
@container (width < 560px) {
    .msp-price-table.is-multicol,
    .msp-price-table.is-multicol thead,
    .msp-price-table.is-multicol tbody,
    .msp-price-table.is-multicol tr,
    .msp-price-table.is-multicol th,
    .msp-price-table.is-multicol td {
        display: block;
    }

    .msp-price-table.is-multicol thead {
        display: none;
    }

    .msp-price-table.is-multicol tbody tr {
        border-bottom: 2px solid #e2e8f0;
    }

    .msp-price-table.is-multicol tbody tr:last-child {
        border-bottom: 0;
    }

    .msp-price-table.is-multicol tbody th {
        position: static;
        background: #f8fafc;
        border-right: 0;
        font-weight: 700;
        padding: 0.75rem 1rem;
    }

    .msp-price-table.is-multicol tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.65rem 1rem;
        border-right: 0;
    }

    .msp-price-table.is-multicol tbody td:nth-child(2)::before {
        content: var(--label-2) ": ";
        font-weight: 600;
        color: #475569;
    }

    .msp-price-table.is-multicol tbody td:nth-child(3)::before {
        content: var(--label-3) ": ";
        font-weight: 600;
        color: #475569;
    }

    .msp-price-table.is-multicol tbody td:nth-child(4)::before {
        content: var(--label-4) ": ";
        font-weight: 600;
        color: #475569;
    }

    .msp-price-table.is-multicol tbody td:nth-child(5)::before {
        content: var(--label-5) ": ";
        font-weight: 600;
        color: #475569;
    }
}

/* ── Action Bar below pricing tables ── */
.msp-price-actions {
    margin-block-start: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.msp-price-note {
    margin: 0;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.msp-price-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.msp-price-btn-primary,
.msp-price-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 1.25rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 150ms ease-out, border-color 150ms ease-out, transform 150ms ease-out;
}

.msp-price-btn-primary {
    background: #0000a0;
    border: 1px solid #0000a0;
    color: #ffffff !important;
}

.msp-price-btn-primary:hover {
    background: #00007a;
    border-color: #00007a;
    color: #ffffff !important;
}

.msp-price-btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a !important;
}

.msp-price-btn-outline:hover {
    background: #f8fafc;
    border-color: #0000a0;
    color: #0000a0 !important;
}

.msp-price-btn-primary:active,
.msp-price-btn-outline:active {
    transform: scale(0.97);
}

@media (forced-colors: active) {
    .msp-price-table-wrap,
    .msp-price-btn-primary,
    .msp-price-btn-outline {
        border: 1px solid CanvasText;
    }
}
