/* ── Detailed cost breakdown (full-width section) ── */
/* Enterprise Pricing Calculator - Detailed cost breakdown, ToC */

.ec-link-detailed-breakdown {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4f46e5;
    text-decoration: none;
    transition: color 150ms ease;
}

.ec-link-detailed-breakdown:hover {
    color: #4338ca;
}

.ec-detailed-breakdown {
    margin-top: 24px;
    padding-bottom: 24px;
}

.ec-detailed-breakdown .ec-card {
    max-width: 100%;
}

/* Detailed breakdown has more content - needs larger max-height when expanded */
#ec-detailed-breakdown-body.ec-accordion-body:not(.ec-accordion--collapsed) {
    max-height: 5000px;
}

#ec-detailed-breakdown-content {
    padding-bottom: 24px;
}

/* Smooth scroll for ToC anchor links */
html {
    scroll-behavior: smooth;
}

/* Scroll margin so targets don't sit under sticky header */
#ec-detailed-breakdown-content .ec-detail-block[id] {
    scroll-margin-top: 24px;
}

/* ── ToC: Stripe-style nav for detailed breakdown ── */
.ec-breakdown-toc {
    margin-bottom: 28px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ec-breakdown-toc-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px 0;
}

.ec-breakdown-toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.ec-breakdown-toc-list li {
    margin: 0;
}

.ec-breakdown-toc-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    padding: 4px 0;
    border-radius: 4px;
    transition: color 150ms ease, background 150ms ease;
    display: inline-block;
}

.ec-breakdown-toc-link:hover {
    color: #4f46e5;
}

.ec-breakdown-toc-link:focus {
    outline: none;
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.08);
}

.ec-breakdown-toc-link:active {
    color: #4338ca;
}

/* Back to top link - at end of each section */
.ec-breakdown-back-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    transition: color 150ms ease;
}

.ec-breakdown-back-link:hover {
    color: #4f46e5;
}

.ec-detail-block {
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.ec-detail-block:last-child {
    border-bottom: none;
    padding-bottom: 24px;
}

.ec-detail-block-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}


.ec-detail-workings,
.ec-detail-assumption,
.ec-detail-formula {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
}

.ec-detail-step {
    margin-top: 6px;
}

.ec-detail-step:first-child {
    margin-top: 0;
}

.ec-detail-step.ec-detail-formula {
    margin-top: 8px;
}

.ec-detail-assumption {
    font-style: italic;
}

/* ── Dual-tier layout: table for column alignment ── */
.ec-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.ec-breakdown-table th,
.ec-breakdown-table td {
    padding: 6px 12px 6px 0;
    text-align: right;
    vertical-align: top;
}

.ec-breakdown-table th:first-child,
.ec-breakdown-table td:first-child {
    text-align: left;
    padding-right: 16px;
}

.ec-col-label {
    width: 40%;
}

.ec-col-v-inr,
.ec-col-p-inr {
    width: 100px;
}

.ec-col-v-usd,
.ec-col-p-usd {
    width: 80px;
}

.ec-breakdown-table thead th {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.ec-breakdown-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.ec-breakdown-table tbody tr:last-child {
    border-bottom: none;
}

.ec-breakdown-table .ec-detail-label-cell {
    vertical-align: top;
}

.ec-breakdown-table .ec-detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.ec-breakdown-table .ec-detail-show-derivation {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 4px;
    cursor: pointer;
    text-align: left;
    transition: color 150ms ease;
}

.ec-breakdown-table .ec-detail-show-derivation:hover {
    color: #4f46e5;
}

.ec-breakdown-table .ec-result-value,
.ec-breakdown-table .ec-result-value-secondary {
    font-size: 0.875rem;
    font-weight: 400;
    color: #1e293b;
}

.ec-breakdown-table .ec-result-value--cost-total {
    font-weight: 600;
}

.ec-breakdown-table .ec-result-label--strong {
    font-weight: 600;
}

.ec-breakdown-table tbody tr.ec-detail-row--subtotal td,
.ec-breakdown-table tbody tr.ec-detail-row--total td {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.ec-detail-workings-cell {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.ec-detail-workings-panel {
    padding: 12px 0 12px 0;
}

.ec-detail-workings-panel--collapsed {
    display: none;
}

.ec-detail-tier-switcher {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.ec-detail-tier-pill {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.ec-detail-tier-pill:hover {
    color: #475569;
    background: #e2e8f0;
}

.ec-detail-tier-pill--active {
    color: #4f46e5;
    background: #eef2ff;
    border-color: #c7d2fe;
}

.ec-detail-workings--vanilla.hidden,
.ec-detail-workings--premium.hidden {
    display: none;
}

