/* ============================================================
   toolbox-hospitality-channel.css
   Channel Cost Calculator — component styles
   Body, fonts, headings handled by toolbox-global.css
   All colour combos WCAG AA compliant (4.5:1 minimum)
   All text on light/white backgrounds uses #0f1923
============================================================ */

*, *::before, *::after { box-sizing: border-box; }

.cc-shell {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
}

/* ── Cards ─────────────────────────────────────────────── */
.cc-card {
    background: #ffffff;
    border: 1px solid #d0d8e0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(15,25,35,.07);
}

.cc-section-title {
    font-size: .95rem;
    font-weight: 700;
    color: #0f1923;
    margin: 0 0 1.1rem;
    padding-bottom: .55rem;
    border-bottom: 2px solid #b8d9f0;
}

/* ── Form rows ─────────────────────────────────────────── */
.cc-row {
    display: flex;
    gap: .75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: .85rem;
}

.cc-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.cc-field label {
    font-size: .8rem;
    font-weight: 700;
    color: #0f1923;
}

.cc-field input,
.cc-field select {
    padding: .65rem .9rem;
    font-size: .9rem;
    border: 2px solid #d0d8e0;
    border-radius: 8px;
    background: #ffffff;
    color: #0f1923;
    transition: border-color .15s, box-shadow .15s;
}

.cc-field input:focus,
.cc-field select:focus {
    outline: none;
    border-color: #005fa3;
    box-shadow: 0 0 0 3px rgba(0,95,163,.15);
}

.cc-field input:focus-visible,
.cc-field select:focus-visible {
    outline: 3px solid #005fa3;
    outline-offset: 2px;
}

.field-xs  { width: 80px; }
.field-sm  { width: 110px; }
.field-md  { width: 170px; }
.field-lg  { flex: 1; min-width: 160px; }

.cc-field .cc-helper {
    font-size: .78rem;
    font-weight: 600;
    color: #0f1923;
    margin: .15rem 0 0;
    line-height: 1.4;
}

/* ── Channel columns ────────────────────────────────────── */
.channel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.channel-col {
    background: #ffffff;
    border: 1px solid #d0d8e0;
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(15,25,35,.06);
}

.channel-col.direct { border-top: 4px solid #3d9a5a; }
.channel-col.ota    { border-top: 4px solid #b07800; }

.channel-col-title {
    font-size: .9rem;
    font-weight: 700;
    margin: 0 0 .85rem;
    color: #0f1923;
}

.channel-col.direct .channel-col-title { color: #1a5c30; }
.channel-col.ota    .channel-col-title { color: #5a3800; }

/* ── Currency toggle ────────────────────────────────────── */
.cc-toggle {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.cc-toggle-btn {
    padding: .4rem .9rem;
    font-size: .8rem;
    font-weight: 700;
    border: 2px solid #b0bcc8;
    border-radius: 999px;
    background: #ffffff;
    color: #0f1923;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.cc-toggle-btn:hover:not(.active) { border-color: #005fa3; background: #e8f4fb; }
.cc-toggle-btn.active { background: #2d3f52; border-color: #2d3f52; color: #ffffff; }
.cc-toggle-btn:focus-visible { outline: 3px solid #005fa3; outline-offset: 2px; }

/* ── Buttons ────────────────────────────────────────────── */
.cc-run-btn {
    padding: .75rem 1.5rem;
    font-size: .95rem;
    font-weight: 700;
    background: #b8d9f0;
    color: #0f1923;
    border: 2px solid #7ec8f0;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .1s;
    box-shadow: 0 1px 4px rgba(15,25,35,.08);
}

.cc-run-btn:hover  { background: #90c5e8; }
.cc-run-btn:active { transform: scale(.97); }
.cc-run-btn:focus-visible { outline: 3px solid #005fa3; outline-offset: 3px; }

/* ── Results header ─────────────────────────────────────── */
.cc-results-header {
    background: #2d3f52;
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    box-shadow: 0 4px 16px rgba(15,25,35,.12);
}

.cc-results-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 .2rem;
    color: #ffffff;
}

.cc-results-header p {
    margin: 0;
    font-size: .875rem;
    color: #b8d0e8;
}

/* ── Comparison grid ────────────────────────────────────── */
.results-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.compare-col {
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    border: 1px solid #d0d8e0;
    background: #ffffff;
}

.compare-col.direct { border-top: 4px solid #3d9a5a; background: #f0faf4; border-color: #9ad5b0; }
.compare-col.ota    { border-top: 4px solid #b07800; background: #fffbf0; border-color: #e0c060; }

.compare-col-title {
    font-size: .85rem;
    font-weight: 700;
    margin: 0 0 .75rem;
    color: #0f1923;
}

.compare-col.direct .compare-col-title { color: #1a5c30; }
.compare-col.ota    .compare-col-title { color: #5a3800; }

.compare-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
    border-bottom: 1px solid rgba(0,0,0,.08);
    font-size: .85rem;
    color: #0f1923;
    font-weight: 600;
}

.compare-row:last-child { border-bottom: none; }
.compare-row .cr-label  { color: #0f1923; font-weight: 600; }
.compare-row .cr-value  { font-weight: 700; color: #0f1923; font-variant-numeric: tabular-nums; }

.compare-row.cr-total .cr-label,
.compare-row.cr-total .cr-value {
    font-size: 1rem;
    font-weight: 800;
    color: #0f1923;
}

.compare-row.cr-deduct .cr-value { color: #7a1010; }

/* ── Winner banner ──────────────────────────────────────── */
.cc-winner {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: .95rem;
    font-weight: 700;
    color: #0f1923;
    background: #a8d8b8;
    border: 1px solid #3d9a5a;
}

/* ── Summary stats grid ─────────────────────────────────── */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
    margin-bottom: .85rem;
}

.result-card {
    border-radius: 8px;
    padding: .9rem 1rem;
    background: #b8d9f0;
    border: 1px solid #5da8d8;
}

.result-card .result-label { color: #0f1923; font-size: .75rem; font-weight: 700; margin: 0 0 .25rem; }
.result-card .result-value { color: #0f1923; font-size: 1.2rem; font-weight: 800; margin: 0; font-variant-numeric: tabular-nums; }

.result-card.dark          { background: #2d3f52; border-color: #1e2d3d; }
.result-card.dark .result-label { color: #b8d0e8; }
.result-card.dark .result-value { color: #ffffff; }

.result-card.good          { background: #a8d8b8; border-color: #3d9a5a; }
.result-card.good .result-label,
.result-card.good .result-value { color: #0f1923; }

.result-card.warn          { background: #f0d080; border-color: #b07800; }
.result-card.warn .result-label,
.result-card.warn .result-value { color: #0f1923; }

/* ── Badges ─────────────────────────────────────────────── */
.cc-badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.badge-ok   { background: #a8d8b8; color: #0f1923; border: 1px solid #3d9a5a; }
.badge-warn { background: #f0d080; color: #0f1923; border: 1px solid #b07800; }
.badge-info { background: #b8d9f0; color: #0f1923; border: 1px solid #5da8d8; }

/* ── Divider / note ─────────────────────────────────────── */
.cc-divider {
    border: none;
    border-top: 1px solid #d0d8e0;
    margin: 1rem 0;
}

.cc-note {
    font-size: .8rem;
    font-weight: 700;
    color: #0f1923 !important;
    margin: .5rem 0 0;
    line-height: 1.5;
}

/* ── Explainer accordion ─────────────────────────────────── */
.cc-explainer {
    border: 1px solid #d0d8e0;
    border-radius: 10px;
    margin-top: 1.5rem;
    background: #ffffff;
    overflow: hidden;
}

.cc-explainer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .9rem 1.25rem;
    background: #ffffff;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 700;
    color: #0f1923;
    text-align: left;
    transition: background .15s;
}

.cc-explainer-head:hover { background: #f0f4f8; }

.cc-explainer-head svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
    transition: transform .2s;
}

.cc-explainer-head[aria-expanded="true"] svg { transform: rotate(180deg); }

.cc-explainer-body {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #d0d8e0;
}

.cc-explainer-body h3 {
    font-size: .9rem;
    font-weight: 700;
    margin: 1rem 0 .25rem;
    color: #0f1923;
}

.cc-explainer-body h3:first-child { margin-top: 0; }

.cc-explainer-body p {
    font-size: .875rem;
    margin: 0 0 .3rem;
    line-height: 1.55;
    color: #0f1923;
}

/* ── Disclaimer ─────────────────────────────────────────── */
.hc-disclaimer {
    margin-top: 1.5rem;
    padding: .9rem 1.1rem;
    background: #b8d9f0;
    border: 1px solid #5da8d8;
    border-radius: 10px;
    font-size: .8rem;
    line-height: 1.5;
}

.hc-disclaimer p { color: #0f1923; margin: 0; font-weight: 600; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
    .channel-grid,
    .results-compare  { grid-template-columns: 1fr; }
    .field-sm, .field-md { width: 100%; }
    .cc-row  { flex-direction: column; align-items: stretch; }
    .results-grid { grid-template-columns: 1fr 1fr; }
    .cc-results-header { flex-direction: column; }
}

@media print {
    nav, header, footer,
    .cc-run-btn, .cc-explainer, .hc-disclaimer { display: none !important; }
    .cc-results-header {
        background: #2d3f52 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    body { font-size: 11pt; }
}