/* ---------------------------------------------------------------------------
 * cost-calculator.css — the widget on the free cost calculator page
 * (/tools/product-photography-cost-calculator).
 *
 * Everything is scoped under `.costcalc-section` / `.costcalc` so it cannot
 * leak into the other `body.templates-page` verticals (glossary, alternatives,
 * features, use-cases, styles, faq) that share that body class.
 *
 * House rules honoured: flat fills only, no gradients, no glows, hairline
 * borders, pills for buttons per soft-studio.css section 4, pink only as the
 * accent with ink text on it, colours read from the theme-aware --t-* /
 * --ss-* tokens so light mode needs no second block, Satoshi via
 * --font-clash. Hover is a fill, not a leap. Loaded as a raw <link> so it
 * carries a ?v= token.
 * ------------------------------------------------------------------------- */

.costcalc-section {
    padding: 0 20px 64px;
}

.costcalc {
    max-width: 1020px;
    margin: 0 auto;
    background: var(--t-bg-card, #FFFFFF);
    border: 1px solid var(--t-border, #E7E4DF);
    border-radius: 24px;
    padding: 28px;
    box-sizing: border-box;
}

.costcalc-shell {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
}

@media (max-width: 900px) {
    .costcalc-shell {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ── inputs ────────────────────────────────────────────────────────────── */

.costcalc-field {
    margin: 0 0 22px;
}

.costcalc-field:last-child {
    margin-bottom: 0;
}

.costcalc-label {
    display: block;
    font-family: var(--font-clash), sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--t-text, #141414);
    margin: 0 0 10px;
}

.costcalc-products-val {
    display: inline-block;
    min-width: 34px;
    text-align: center;
    background: var(--ss-pink, #FFD3F6);
    color: var(--ss-ink, #141414);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 13.5px;
    font-weight: 600;
}

input.costcalc-products {
    width: 100%;
    accent-color: var(--ss-ink, #141414);
    margin: 0;
}

input.costcalc-products:focus-visible {
    outline: 2px solid var(--ss-ink, #141414);
    outline-offset: 2px;
}

.costcalc-range-ends {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--t-text-muted, #6B6660);
    margin-top: 4px;
}

.costcalc-seg {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.costcalc-seg-btn {
    flex: 1 1 auto;
    min-height: 42px;
    padding: 8px 15px;
    background: var(--t-bg-card, #FFFFFF);
    border: 1px solid var(--t-border, #E7E4DF);
    border-radius: 999px;
    font-family: var(--font-clash), sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--t-text, #141414);
    cursor: pointer;
    text-align: center;
    transition: background-color 150ms cubic-bezier(0.22, 0.7, 0.28, 1),
        border-color 150ms cubic-bezier(0.22, 0.7, 0.28, 1);
}

.costcalc-seg-btn:hover {
    background: var(--t-bg-soft, #F4F2EF);
    border-color: var(--t-border-mid, #DAD6D0);
}

.costcalc-seg-btn:focus-visible {
    outline: 2px solid var(--ss-ink, #141414);
    outline-offset: 2px;
}

.costcalc-seg-btn:active {
    transform: scale(0.98);
}

.costcalc-seg-btn[aria-checked='true'] {
    background: var(--ss-pink, #FFD3F6);
    border-color: var(--ss-pink, #FFD3F6);
    color: var(--ss-ink, #141414);
}

/* Two-line selector, still a pill and still inside the 32-50px button rule:
   tight line heights keep the control at ~48px. */
.costcalc-seg-stack .costcalc-seg-btn {
    flex: 1 1 100%;
    text-align: left;
    border-radius: 999px;
    padding: 7px 20px;
}

.costcalc-seg-name {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    color: inherit;
}

.costcalc-seg-sub {
    display: block;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--t-text-muted, #6B6660);
}

.costcalc-seg-btn[aria-checked='true'] .costcalc-seg-sub {
    color: var(--ss-ink, #141414);
}

.costcalc-video-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--t-border, #E7E4DF);
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 150ms cubic-bezier(0.22, 0.7, 0.28, 1);
}

.costcalc-video-label:hover {
    background: var(--t-bg-soft, #F4F2EF);
}

.costcalc-video-label:focus-within {
    outline: 2px solid var(--ss-ink, #141414);
    outline-offset: 2px;
}

input.costcalc-video {
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    accent-color: var(--ss-ink, #141414);
    flex: 0 0 auto;
}

/* ── results ───────────────────────────────────────────────────────────── */

.costcalc-card {
    border: 1px solid var(--t-border, #E7E4DF);
    border-radius: 18px;
    padding: 18px 20px;
    margin: 0 0 12px;
}

.costcalc-card-db {
    background: var(--ss-pink-3, #FFF3FC);
    border-color: var(--ss-pink, #FFD3F6);
}

.costcalc-card-kicker {
    font-family: var(--font-clash), sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--t-text-muted, #6B6660);
    margin: 0 0 6px;
}

.costcalc-card-db .costcalc-card-kicker {
    color: var(--ss-ink, #141414);
}

.costcalc-card-price {
    font-family: var(--font-clash), sans-serif;
    font-size: 34px;
    font-weight: 620;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--t-text, #141414);
    margin: 0 0 4px;
}

.costcalc-card-permonth {
    font-size: 15px;
    font-weight: 600;
    color: var(--t-text-secondary, #57534E);
    margin-left: 6px;
}

.costcalc-card-sub {
    font-size: 14px;
    font-weight: 600;
    color: var(--t-text, #141414);
    margin: 0 0 2px;
}

.costcalc-card-note {
    font-size: 12.5px;
    color: var(--t-text-muted, #6B6660);
    margin: 0;
}

.costcalc-save {
    border-top: 1px solid var(--t-border, #E7E4DF);
    padding: 14px 4px 2px;
    margin: 0 0 14px;
}

.costcalc-save-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 6px;
}

.costcalc-save-label {
    font-size: 13.5px;
    color: var(--t-text-secondary, #57534E);
}

.costcalc-save-val {
    font-family: var(--font-clash), sans-serif;
    font-size: 17px;
    font-weight: 620;
    color: var(--t-text, #141414);
}

.costcalc-copy {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 8px 20px;
    background: var(--ss-ink, #141414);
    color: #FFFFFF;
    border: none;
    border-radius: 999px;
    font-family: var(--font-clash), sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 150ms cubic-bezier(0.22, 0.7, 0.28, 1);
}

.costcalc-copy:hover {
    background: #2A2A2A;
}

.costcalc-copy:focus-visible {
    outline: 2px solid var(--ss-ink, #141414);
    outline-offset: 2px;
}

.costcalc-copy:active {
    transform: scale(0.98);
}

/* The quotable direct answer under the calculator card. */
.costcalc-answer {
    max-width: 820px;
    margin: 22px auto 0;
    background: var(--ss-pink-3, #FFF3FC);
    border: 1px solid var(--ss-pink, #FFD3F6);
    border-radius: 18px;
    padding: 18px 24px;
}

.costcalc-answer-kicker {
    font-family: var(--font-clash), sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ss-ink, #141414);
    margin: 0 0 6px;
}

.costcalc-answer-line {
    font-family: var(--font-clash), sans-serif;
    font-size: 16.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.5;
    color: var(--t-text, #141414);
    margin: 0;
}

.costcalc-disclaimer {
    max-width: 1020px;
    margin: 14px auto 0;
    font-size: 12.5px;
    color: var(--t-text-muted, #6B6660);
    text-align: center;
}

/* ── fact tables (rates + studio/freelancer/AI comparison) ─────────────── */
/* Wide content scrolls inside its own container; the page never scrolls
   sideways. */

.costcalc-specs-wrap {
    overflow-x: auto;
}

.costcalc-specs {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 0;
    font-size: 15px;
}

.costcalc-specs caption {
    text-align: left;
    font-size: 14px;
    color: var(--t-text-muted, #6B6660);
    padding-bottom: 10px;
}

.costcalc-specs th,
.costcalc-specs td {
    text-align: left;
    padding: 11px 16px 11px 0;
    border-bottom: 1px solid var(--t-border, #E7E4DF);
    color: var(--t-text-secondary, #57534E);
    background: transparent;
    white-space: nowrap;
}

/* Labels (first column) and prose cells (last column) may wrap; the money and
   duration columns between them never break mid-range. */
.costcalc-specs td:first-child,
.costcalc-specs th:first-child,
.costcalc-specs td:last-child,
.costcalc-specs th:last-child {
    white-space: normal;
}

.costcalc-specs td:last-child,
.costcalc-specs th:last-child {
    padding-right: 0;
}

.costcalc-specs th {
    color: var(--t-text, #141414);
    font-weight: 600;
}

.costcalc-specs tbody td:first-child {
    color: var(--t-text, #141414);
    font-weight: 600;
}

/* ── sources list ──────────────────────────────────────────────────────── */

.costcalc-sources {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
}

.costcalc-sources li {
    border-left: 3px solid var(--ss-pink, #FFD3F6);
    padding: 2px 0 2px 14px;
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--t-text-secondary, #57534E);
}

.costcalc-sources a {
    color: var(--t-text, #141414);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.costcalc-sources a:hover {
    text-decoration-thickness: 2px;
}

/* ── motion ────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .costcalc *,
    .costcalc *::before,
    .costcalc *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
