/* ========================================
   OKPW — Cost calculator page (/cost-calculator), drawings edition (14 Oct 2026)
   ========================================
   Tiles, list rows, size pills and the result reuse css/calculator.css (the homepage
   calculator's own look). This file lays the page out: two layouts, made on purpose.
     phone   (under 1024px)  one column; the running price is a bar pinned under the nav that
                             opens to the full list; cards two to a row
     desktop (1024px and up) steps on the left, the running price a panel on the right that
                             stays in view, list always open; cards three to a row
   White ground, light green and olive accents only. */

.cc-page { padding: calc(var(--nav-height) + 32px) 0 64px; background: var(--white); }

.cc-head { margin: 0 0 32px; }
.cc-head h1 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--charcoal);
    margin: 10px 0 12px;
}
.cc-lede { color: var(--gray-600); font-size: 1.05rem; max-width: 640px; margin: 0; }

.cc-layout { display: grid; gap: 24px; align-items: start; }
.cc-steps { min-width: 0; }
.cc-steps .calc-step { padding: 0; }
.cc-steps .calc-question { font-size: 1.45rem; text-align: left; }
.cc-steps .calc-subtitle { text-align: left; }
.cc-steps .calc-question[tabindex="-1"]:focus, .cc-steps .calc-result-label[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- the running price ---- */
.cc-price { min-width: 0; background: var(--white); z-index: 20; }
.cc-price-bar {
    display: flex; align-items: center; gap: 12px; width: 100%;
    min-height: 56px; padding: 10px 0;
    border: 0; background: none; text-align: left; cursor: pointer;
    font: inherit; color: var(--charcoal);
}
.cc-price-bar:focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; border-radius: 8px; }
.cc-price-totals { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; }
.cc-pt { display: inline-flex; flex-direction: column; line-height: 1.2; }
.cc-pt em { font-style: normal; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-500); }
.cc-pt strong { font: 700 1.08rem var(--font-display); color: var(--charcoal); }
.cc-pt--empty { font-size: 0.92rem; color: var(--gray-600); }
.cc-price-chev {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    border: 1.5px solid var(--gray-300); position: relative;
}
.cc-price-chev::after {
    content: ""; position: absolute; left: 50%; top: 45%; width: 8px; height: 8px;
    border-right: 2px solid var(--charcoal); border-bottom: 2px solid var(--charcoal);
    transform: translate(-50%, -50%) rotate(45deg); transition: transform 0.2s;
}
.cc-price.open .cc-price-chev::after { transform: translate(-50%, -20%) rotate(225deg); }
.cc-price-title { font: 700 1.05rem var(--font-display); color: var(--charcoal); margin: 0 0 12px; }
.cc-pf { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.cc-pf span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-500); }
.cc-pf strong { font: 700 1.5rem var(--font-display); color: var(--charcoal); line-height: 1.2; }
.cc-pf small { font-size: 0.8rem; color: var(--gray-600); }
.cc-price-empty { color: var(--gray-600); font-size: 0.92rem; margin: 0; }
.cc-price-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cc-price-list li {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name remove" "price remove";
    gap: 2px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.cc-pl-name { grid-area: name; font-weight: 600; font-size: 0.92rem; color: var(--charcoal); }
.cc-pl-name em { font-style: normal; font-weight: 500; color: var(--gray-500); }
.cc-pl-price { grid-area: price; font-size: 0.85rem; color: var(--olive-dark); font-weight: 600; }
.cc-pl-remove {
    grid-area: remove; width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: none; color: var(--gray-500); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.cc-pl-remove:hover { background: var(--gray-50); color: var(--charcoal); }
.cc-pl-remove:focus-visible { outline: 3px solid var(--olive); outline-offset: -3px; }

/* ---- your house, with everything picked: the perspective drawing, the renewables beside it ---- */
.cc-house { display: grid; gap: 10px; margin: 0 0 14px; }
.cc-house-draw { aspect-ratio: 320 / 240; max-width: 100%; }
.cc-house-draw svg, .cc-house-draw img { display: block; width: 100%; height: 100%; object-fit: contain; }
.cc-renew-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.cc-renew-tiles li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border: 1px solid var(--gray-200); border-radius: 10px; text-align: center; }
.cc-renew-tiles img { width: 100%; max-width: 72px; height: 54px; object-fit: contain; }
.cc-renew-tiles span { font-size: 0.72rem; line-height: 1.25; color: var(--gray-700); }
.cc-house--result { max-width: 720px; margin: 0 auto 18px; }
.cc-house--result.cc-house--renew-only .cc-renew-tiles { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
@media (min-width: 720px) {
    .cc-house--result:not(.cc-house--renew-only):has(.cc-renew-tiles) { grid-template-columns: minmax(0, 1fr) 150px; align-items: center; }
    .cc-house--result .cc-renew-tiles { grid-template-columns: 1fr; }
}
.cc-pf--space strong { font-size: 1.15rem; }
.cc-result-space { margin: 6px 0 2px; font-size: 0.95rem; color: var(--gray-700); }
.cc-result-space strong { color: var(--olive-dark); }
/* a part that has just been picked arrives on the house */
.cc-arrive { animation: cc-arrive 0.65s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes cc-arrive { from { transform: translate(var(--fx), var(--fy)); opacity: 0; } 35% { opacity: 1; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cc-arrive { animation: none; } }

/* ---- planning ---- */
.cc-plan { margin: 0 14px 14px; font-size: 0.82rem; line-height: 1.5; color: var(--gray-700); }
.cc-plan span { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--olive-dark); margin-bottom: 2px; }
.cc-plan-note { margin: 18px 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--gray-500); }
.cc-plans { text-align: left; margin: 18px 0 8px; padding: 16px 18px; border: 1px solid var(--gray-200); border-radius: 12px; }
.cc-plans h4 { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500); margin: 0 0 8px; }
.cc-plans ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cc-plans li { font-size: 0.86rem; line-height: 1.5; color: var(--gray-700); }
.cc-plans li strong { display: block; color: var(--charcoal); }
.cc-plans .cc-plan-note { margin-top: 12px; }

/* ---- the two doors ---- */
.cc-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.cc-door {
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 22px; border: 2px solid var(--gray-200); border-radius: 16px; background: var(--white);
    cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
}
.cc-door img { width: auto; max-width: 100%; height: 120px; object-fit: contain; align-self: center; margin-bottom: 8px; }
.cc-door:hover { border-color: var(--olive); }
.cc-door.selected { border-color: var(--olive); box-shadow: 0 6px 20px rgba(85,107,47,0.1); }
.cc-door:focus-visible { outline: 3px solid var(--olive); outline-offset: 2px; }
.cc-door-text { display: flex; flex-direction: column; gap: 6px; }
.cc-door-title { font: 700 1.12rem var(--font-display); color: var(--charcoal); }
.cc-door-desc { font-size: 0.88rem; color: var(--gray-600); line-height: 1.45; }

/* ---- houses ---- */
.cc-options { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cc-options .calc-option.selected { border-color: var(--olive); }

/* ---- jobs and renewables: cards in a grid; a chosen card opens to the full row for its sizes ---- */
.cc-group { margin-top: 22px; }
.cc-group-title {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
    font: 700 1.05rem var(--font-display); color: var(--charcoal); margin: 0 0 10px;
}
.cc-group-title span { font: 500 0.82rem var(--font-body); color: var(--gray-500); }
.cc-group .calc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: none; margin: 0; }
.cc-group .calc-list-item { display: flex; flex-direction: column; }
.cc-group .calc-list-head { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; position: relative; flex: 1 1 auto; }
.cc-group .calc-list-icon { width: 100%; height: 96px; }
.cc-group .calc-list-icon img { max-width: 100%; max-height: 96px; }
.cc-group .calc-list-check { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; }
.cc-group .calc-list-desc { line-height: 1.4; }
.cc-group .calc-list-item[data-kind="priced"].selected { grid-column: 1 / -1; }
.cc-group .calc-list-item[data-kind="priced"].selected .calc-list-head { flex-direction: row; align-items: center; gap: 14px; flex: 0 0 auto; }
.cc-group .calc-list-item[data-kind="priced"].selected .calc-list-icon { width: 104px; flex-shrink: 0; }
.cc-group .calc-list-item[data-kind="priced"].selected .calc-list-check { position: static; }
.cc-group .calc-list-sizes { padding: 0 14px 12px; }
.cc-size-note { margin: 0 14px 14px; font-size: 0.82rem; line-height: 1.45; color: var(--charcoal); }
.calc-size-pill { min-height: 44px; }

.cc-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.cc-steps .calc-back { min-height: 44px; }
.cc-nav .btn[disabled] { opacity: 0.45; pointer-events: none; }
.cc-stamp { margin: -4px 0 10px; font-size: 0.8rem; line-height: 1.45; color: var(--gray-600); }
.calc-result .cc-stamp { margin: 10px 0 14px; }
.cc-steps .ri-price { white-space: normal; text-align: right; }
.cc-steps .calc-result-items li { gap: 12px; }
.cc-noscript { padding: 20px; border: 1px solid var(--gray-200); border-radius: 12px; color: var(--gray-700); }

/* ---- the form ---- */
.cc-contact { margin: 56px auto 0; scroll-margin-top: calc(var(--nav-height) + 16px); }
.cc-contact[hidden] { display: none; }
.cc-contact h2 { font-family: var(--font-display); font-size: 1.7rem; color: var(--charcoal); margin-bottom: 6px; }
.cc-contact > p { color: var(--gray-600); margin-bottom: 20px; }

/* ---------------------------------------------------------------- phone */
@media (max-width: 1023px) {
    .cc-page { padding-top: calc(var(--nav-height) + 20px); }
    .cc-head { margin-bottom: 20px; }
    /* the running price: a bar pinned under the nav, full bleed, opening to the list */
    .cc-price {
        position: sticky; top: var(--nav-height);
        margin: 0 -20px; padding: 0 20px;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: 0 8px 12px -12px rgba(0,0,0,0.25);
    }
    .cc-price-body { display: none; padding: 0 0 12px; max-height: 55vh; overflow-y: auto; }
    .cc-price.open .cc-price-body { display: block; }
    .cc-price-title, .cc-price-full { display: none; }
    .cc-price:not(.has-items) .cc-price-chev { visibility: hidden; }
    .cc-steps .ri-price { text-align: left; }
    .cc-steps .calc-result-items li { flex-direction: column; align-items: flex-start; gap: 2px; }
    .cc-contact textarea { min-height: 190px; }
}
@media (max-width: 767px) {
    .cc-price { margin: 0 -16px; padding: 0 16px; }
}
@media (max-width: 480px) {
    .cc-doors { grid-template-columns: 1fr; }
    .cc-door { flex-direction: row; align-items: center; gap: 14px; padding: 16px; }
    .cc-door img { height: 72px; width: 84px; margin: 0; align-self: center; }
    .cc-door-text { min-width: 0; }
    .cc-group .calc-list-icon { height: 80px; }
    .cc-group .calc-list-icon img { max-height: 80px; }
    .cc-group .calc-list-head { padding: 12px; }
    .cc-nav .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- desktop */
@media (min-width: 1024px) {
    .cc-layout { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 48px; }
    .cc-steps { grid-column: 1; grid-row: 1; }
    .cc-price {
        grid-column: 2; grid-row: 1;
        position: sticky; top: calc(var(--nav-height) + 24px);
        padding: 22px 24px; border: 1px solid var(--gray-200); border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        max-height: calc(100vh - var(--nav-height) - 48px); overflow-y: auto;
    }
    .cc-price-bar { display: none; }
    .cc-price-body { display: block; }
    .cc-group .calc-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .cc-group .calc-list-icon { height: 150px; }
    .cc-group .calc-list-icon img { max-width: 180px; max-height: 150px; }
    .cc-group .calc-list-item[data-kind="priced"].selected .calc-list-icon { width: 160px; height: 120px; }
    .cc-group .calc-list-item[data-kind="priced"].selected .calc-list-icon img { max-height: 120px; }
    .cc-door img { height: 170px; }
}
@media (min-width: 1280px) {
    .cc-group .calc-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .cc-price-chev::after, .cc-door { transition: none; }
}

/* The survey form's estimate card (16 Oct 2026): what the visitor built, above the form that sends it */
.cc-estimate { margin: 0 0 24px; padding: 20px 24px; border: 1px solid var(--gray-200); border-radius: 14px; background: var(--white); }
.cc-estimate[hidden] { display: none; }
.cc-estimate h3 { font-family: var(--font-display); font-size: 1.05rem; color: var(--charcoal); margin: 0 0 8px; }
.cc-estimate ul { list-style: none; margin: 0; padding: 0; }
.cc-estimate li { padding: 8px 0; border-top: 1px solid var(--gray-100); color: var(--gray-700); font-size: 0.95rem; line-height: 1.45; }
.cc-estimate li:first-child { border-top: 0; }
.cc-estimate .cc-estimate-total { font-weight: 600; color: var(--olive); }

/* The estimate by email (16 Oct 2026): for a visitor not ready for a survey, under the estimate's buttons */
.cc-emailme { margin: 28px auto 0; max-width: 680px; padding: 22px 24px; border: 1px solid var(--gray-200); border-radius: 14px; background: var(--white); text-align: left; }
.cc-emailme h4 { font-family: var(--font-display); font-size: 1.05rem; color: var(--charcoal); margin: 0 0 4px; }
.cc-emailme p { margin: 0 0 14px; color: var(--gray-600); font-size: 0.95rem; line-height: 1.5; }
.cc-emailme-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: center; }
.cc-emailme-row[hidden], .cc-emailme-note[hidden] { display: none; }
.cc-emailme .form-group { margin: 0; }
.cc-emailme-row .btn { justify-content: center; min-height: 48px; }
.cc-emailme .cc-emailme-note { margin: 10px 0 0; font-size: 0.85rem; color: var(--gray-500); }
.cc-emailme .cc-emailme-status { margin: 10px 0 0; font-weight: 600; color: var(--olive); }
.cc-emailme .cc-emailme-status:empty { display: none; }
@media (min-width: 760px) {
    .cc-emailme-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .cc-emailme-row .btn { grid-column: 1 / -1; justify-self: start; }
}
