/* Autocomputing Solar app.css — layout additions on top of the Gridtop skin (skin.css, verbatim from
   SATVIEW / the web editor). Every new component below is built from the skin's own tokens and bevel
   recipes; nothing introduces a colour or font the skin does not already define. */

/* Gridtop-style scrollbars for menu + modal bodies (as SATVIEW) */
.sv-menu::-webkit-scrollbar, .sv-modal-body::-webkit-scrollbar { width: 10px; }
.sv-menu::-webkit-scrollbar-track, .sv-modal-body::-webkit-scrollbar-track { background: #ECECEC; }
.sv-menu::-webkit-scrollbar-thumb, .sv-modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #F4F4F4, #D9D9D9);
    border: 1px solid #C4C4C4;
    border-radius: 2px;
}

/* ---------- Mode buttons: Buy · Loan · Lease · PPA — the inset segmented control, toolbar height ---------- */
.sl-seg { display: inline-flex; }
.sl-seg-btn {
    height: 26px; min-width: 48px; padding: 0 11px;
    display: inline-flex; align-items: center; justify-content: center;
    font: 600 11px/1 'Afacad', sans-serif; letter-spacing: 0.5px; color: var(--gt-ink);
    background: linear-gradient(180deg, #FFFFFF, #F0F0F0 45%, #D5D5D5);
    border: 1px solid var(--sv-btn-stroke);
    box-shadow: inset 1px 1px 0 var(--sv-btn-hi), inset -1px -1px 0 var(--sv-btn-lo), 0 1px 1px rgba(0, 0, 0, 0.1);
    cursor: pointer; transition: all 0.08s ease;
}
.sl-seg-btn + .sl-seg-btn { border-left: 0; }
.sl-seg-btn:first-child { border-radius: 2px 0 0 2px; }
.sl-seg-btn:last-child { border-radius: 0 2px 2px 0; }
.sl-seg-btn:hover { border-color: var(--gt-purple); color: #2E3050; }
.sl-seg-btn.is-on {
    color: #6B5A12;
    background: linear-gradient(180deg, var(--sv-active-top), var(--sv-active-bot));
    border-color: var(--sv-active-stroke);
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.08);
}
.sl-seg-btn:focus-visible { outline: 2px solid var(--gt-focus); outline-offset: -2px; }

/* ---------- Step progress in the timeline trough ---------- */
.sl-progress { height: 16px; cursor: default; }
.sl-progress .sv-tl-seg { cursor: pointer; background: #CFCBE4; }
.sl-progress .sv-tl-seg.is-loaded { background: linear-gradient(180deg, #A99FFC, #857EB6); }
.sl-prog-dot { display: block; width: 100%; text-align: center; font: 700 8.5px/14px 'Afacad', sans-serif; letter-spacing: 0.5px; color: #2E3050; user-select: none; }

/* ---------- the roof canvas: fill the viewport ---------- */
#roof { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#roof:active { cursor: grabbing; }

/* long values cap with an ellipsis so the toolbar never crowds out the mode buttons */
#dd-address-val { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
#hud-address { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the step panel owns the left edge; the HUD sits at the bottom right while it is open */
#mapwrap .sv-hud { left: auto; right: 12px; }

/* ---------- The step panel — the conditions-brief anatomy, hosting the flow ---------- */
.sl-panel {
    position: absolute; z-index: 875; left: 14px; top: 14px; bottom: 14px; width: min(430px, calc(100% - 28px));
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #FDFDFD, #ECECEF); border: 1px solid #BDBDBD; border-radius: 2px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 34px rgba(10, 11, 16, 0.45); color: var(--gt-ink); font-size: 12.5px;
}
.sl-panel[hidden] { display: none; }
.sl-panel::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: linear-gradient(90deg, #F4F4F6, #A7A9B6 50%, #F4F4F6); }
.sl-panel.is-yellow::before { background: linear-gradient(90deg, #FFF7C4, #FFEC64 50%, #E3C94F); }
.sl-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 12px 8px; border-bottom: 1px solid rgba(68, 70, 94, 0.2); }
.sl-panel-head b { display: block; font-size: 16px; }
.sl-panel-head span { font-size: 11px; color: var(--gt-ink-soft); }
.sl-panel-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 12px 12px; }
.sl-panel-foot { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid rgba(68, 70, 94, 0.2); background: #F4F3FA; }
.sl-panel-foot-note { flex: 1 1 auto; font-size: 11px; color: var(--gt-ink-soft); text-align: center; }
.sl-panel-foot .sv-text-btn.is-primary { background: var(--gt-ink); color: #FFFFFF; border-color: var(--gt-ink); box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.2); }
.sl-panel-foot .sv-text-btn.is-primary:hover { background: #57597A; color: #FFFFFF; }

/* panel section headers + rows, as the modal body */
.sl-panel-body h5 { margin: 10px 0 6px; font-size: 10px; letter-spacing: 0.7px; text-transform: uppercase; color: var(--gt-ink-soft); }
.sl-panel-body h5:first-child { margin-top: 2px; }
.sl-panel-body p { margin: 6px 0; font-size: 13px; line-height: 1.5; }
.sl-panel-body p em { font-style: normal; color: var(--gt-ink-soft); }
.sl-kv { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px dashed rgba(68, 70, 94, 0.14); font-size: 12.5px; }
.sl-kv:first-of-type { border-top: 0; }
.sl-kv span { color: var(--gt-ink-soft); }
.sl-kv b { font-variant-numeric: tabular-nums; font-weight: 700; }
.sl-main { margin: 2px 0 6px; }
.sl-main-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gt-ink-soft); }
.sl-main-value { font-size: 30px; font-weight: 700; line-height: 1; color: #2E3050; font-variant-numeric: tabular-nums; }
.sl-main-value small { font-size: 13px; font-weight: 600; color: var(--gt-ink-soft); margin-left: 4px; }
.sl-fine { font-size: 10.5px; color: var(--gt-ink-soft); line-height: 1.4; }

/* ---------- Inputs — the when-dialog field, reused ---------- */
.sl-field { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.sl-field > span { font-size: 9.5px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--gt-ink-soft); }
.sl-field input, .sl-field select {
    height: 28px; box-sizing: border-box; width: 100%; padding: 0 7px;
    font: 600 13px/1 'Afacad', sans-serif; color: var(--gt-ink);
    background: #FFFFFF; border: 1px solid var(--sv-btn-stroke); border-radius: 2px;
    font-variant-numeric: tabular-nums;
}
.sl-field input:focus, .sl-field select:focus { outline: none; border-color: var(--gt-purple); }
.sl-field select { cursor: pointer; }
.sl-two { display: flex; gap: 8px; }
.sl-two .sl-field { flex: 1 1 0; min-width: 0; }
.sl-field .sl-unit { position: relative; }
.sl-field .sl-unit input { padding-right: 44px; }
.sl-field .sl-unit::after {
    content: attr(data-unit); position: absolute; right: 7px; top: 0; bottom: 0; display: flex; align-items: center;
    font-size: 11px; color: var(--gt-ink-soft); pointer-events: none;
}

/* ---------- The panels slider — the loading-bar geometry as a track ---------- */
.sl-slider-row { margin: 8px 0 2px; }
.sl-slider {
    -webkit-appearance: none; appearance: none; width: 100%; height: 12px; margin: 6px 0 2px; cursor: pointer;
    background: linear-gradient(180deg, #c2c6d0, #d9dce3);
    border: 1px solid #878b99; border-radius: 0;
    box-shadow: inset 0 1px 2px rgba(29, 7, 14, 0.2), 0 1px 0 rgba(255, 255, 255, 0.8);
}
.sl-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 18px; height: 22px; border-radius: 2px;
    background: linear-gradient(180deg, #FFFFFF, #F0F0F0 45%, #D5D5D5);
    border: 1px solid var(--sv-btn-stroke);
    box-shadow: inset 1px 1px 0 var(--sv-btn-hi), inset -1px -1px 0 var(--sv-btn-lo), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.sl-slider::-moz-range-thumb {
    width: 18px; height: 22px; border-radius: 2px;
    background: linear-gradient(180deg, #FFFFFF, #F0F0F0 45%, #D5D5D5);
    border: 1px solid var(--sv-btn-stroke);
    box-shadow: inset 1px 1px 0 var(--sv-btn-hi), inset -1px -1px 0 var(--sv-btn-lo), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.sl-slider:focus-visible { outline: 2px solid var(--gt-focus); outline-offset: 2px; }
.sl-snaps { position: relative; height: 14px; margin: 0 9px; }
.sl-snaps i {
    position: absolute; top: 0; width: 1px; height: 6px; background: #878b99; transform: translateX(-0.5px);
}
.sl-snaps i.is-near { height: 9px; background: var(--gt-olive); }

/* ---------- Waiting shade over the roof viewport — the loading bar: #FFEC64 over #AAA348 ---------- */
.sl-mapwait {
    position: absolute; inset: 0; z-index: 870; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: rgba(16, 19, 28, 0.55); backdrop-filter: blur(2px);
}
.sl-mapwait[hidden] { display: none; }
.sl-mapwait-bar {
    position: relative; width: min(360px, 70%); height: 12px; overflow: hidden;
    background: linear-gradient(180deg, #B4AD56, #AAA348);
    border: 1px solid #878b99;
    box-shadow: inset 0 1px 2px rgba(29, 7, 14, 0.35), 0 1px 0 rgba(255, 255, 255, 0.25);
}
.sl-mapwait-fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    background: linear-gradient(180deg, #FFF7C4, #FFEC64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset -1px 0 0 #E3C94F;
    transition: width 0.25s ease;
}
.sl-mapwait-label { font: 500 11.5px var(--mono); color: #E8E8E8; letter-spacing: 0.4px; }

/* ---------- Not-in-area card (inside the modal) ---------- */
.sl-wait-email { display: flex; gap: 8px; margin-top: 10px; }
.sl-wait-email input {
    flex: 1 1 auto; height: 28px; padding: 0 8px; font: 600 13px/1 'Afacad', sans-serif; color: var(--gt-ink);
    background: #FFFFFF; border: 1px solid var(--sv-btn-stroke); border-radius: 2px;
}
.sl-wait-email input:focus { outline: none; border-color: var(--gt-purple); }

/* ---------- Menu rows with a leading column (system sizes) ---------- */
.sv-menu .sl-menu-kv { display: flex; gap: 10px; align-items: baseline; }
.sv-menu .sl-menu-kv b { font-variant-numeric: tabular-nums; }
.sv-menu .sl-menu-kv span { font-size: 11px; color: var(--gt-ink-soft); font-variant-numeric: tabular-nums; }

/* menus and modals clear the splash (suggestions + How-it-works over the hero) */
.sv-menu { z-index: 9000; }
.sv-menu.sl-over-splash { z-index: 9900; }
.sv-overlay.sl-over-splash { z-index: 9900; }

/* ---------- Rates panel: the real price history (EIA + BLS), on the right over the roof ---------- */
.sl-panel--rates {
    left: auto; right: 14px; width: min(620px, calc(100% - 28px)); z-index: 880;
}
.sl-panel--rates .sl-panel-body { padding: 10px 14px 14px; }
.sl-head-tools { display: inline-flex; align-items: center; gap: 8px; }
.sl-head-tools .sl-seg-btn { height: 22px; min-width: 34px; padding: 0 9px; font-size: 10px; }
.sl-head-tools .sv-util-btn { width: 20px; height: 20px; font-size: 8pt; }
.sl-chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 2px 0 6px; }
.sl-leg { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--gt-ink-soft); }
.sl-leg-i { display: inline-block; width: 14px; height: 3px; border-radius: 1px; }
.sl-chart-wrap { position: relative; background: #FFFFFF; border: 1px solid var(--sv-divider); border-radius: 2px; box-shadow: inset 1px 1px 0 var(--sv-btn-hi); }
.sl-chart-wrap canvas { display: block; width: 100%; height: 250px; cursor: crosshair; }
.sl-chart-tip {
    position: absolute; z-index: 5; pointer-events: none; padding: 3px 7px; font-size: 10.5px; color: var(--gt-ink);
    background: linear-gradient(180deg, var(--sv-face-top), var(--sv-face-bot)); border: 1px solid var(--sv-btn-stroke); border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25); white-space: nowrap;
}
.sl-rates-body h5 { margin-top: 12px; }

/* ---------- Phones: the panel becomes a bottom sheet; the toolbar wraps as SATVIEW's does ---------- */
@media (max-width: 760px) {
    .sv-topbar { gap: 5px; padding: 6px 8px; }
    .sv-tb-divider { display: none; }
    .sv-dd-label { display: none; }
    .sv-dd { padding: 0 7px; gap: 5px; }
    .sv-dd-value { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
    .sl-seg-btn { min-width: 40px; padding: 0 8px; }
    #btn-zoom-out, #btn-zoom-fit { display: none; }
    .sl-panel { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 56%; border-radius: 2px 2px 0 0; }
    .sl-panel--rates { max-height: 78%; }
    .sl-panel::before { background: linear-gradient(90deg, #F4F4F6, #A7A9B6 50%, #F4F4F6); }
    .sv-hud { top: 8px; bottom: auto; left: 8px; padding: 4px 8px; gap: 6px; font-size: 10.5px; max-width: calc(100% - 128px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sv-locked-chip { top: auto; bottom: 8px; right: 8px; }
    .sv-status-right { display: none; }
    .sv-status-credit { display: inline; }
    .sl-prog-dot { font-size: 7.5px; }
    .sl-main-value { font-size: 26px; }
}
@media (min-width: 761px) { .sv-status-credit { display: none; } }
