/* =========================================================
   Pendax SOLO – köpguide / projekteringsverktyg
   ---------------------------------------------------------
   Layered on the Pendax design system (style.css). All selectors
   are scoped under .solo-guide so styling never leaks. Mirrors the
   solo-matrix component language (presets, segmented controls,
   switches) and adds a recommendation + specification panel.
   ========================================================= */
.solo-guide {
    --g-accent: var(--pendax-accent);
    --g-accent-strong: var(--pendax-accent-strong);
    --g-accent-soft: rgba(var(--pendax-accent-rgb), 0.16);
    --g-panel: var(--surface);
    --g-panel-2: var(--surface-alt);
    --g-line: var(--border);
    --g-text: var(--ink);
    --g-muted: var(--ink-muted);
    --g-ok: #2e7d52;
    --g-ok-soft: rgba(46, 125, 82, 0.10);
    --g-ok-line: rgba(46, 125, 82, 0.32);
    --g-off: #9aa7b5;
    --g-radius: var(--radius-md);
}

/* ---- Presets ---- */
.solo-guide .presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
}
.solo-guide .preset-label {
    font-size: 0.8rem;
    color: var(--g-muted);
    width: 100%;
    margin-bottom: 0.1rem;
}
.solo-guide .preset {
    background: var(--g-panel);
    border: 1px solid var(--g-line);
    color: var(--g-text);
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.solo-guide .preset:hover {
    border-color: var(--g-accent);
    color: var(--g-accent-strong);
    box-shadow: var(--shadow-sm);
}
.solo-guide .preset .ic { font-size: 1rem; }

/* ---- Layout ---- */
.solo-guide .guide-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.75rem;
    align-items: start;
    margin-top: 1.75rem;
}
@media (max-width: 991.98px) {
    .solo-guide .guide-grid { grid-template-columns: 1fr; }
}

.solo-guide .guide-card {
    background: var(--g-panel);
    border: 1px solid var(--g-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.solo-guide .controls { position: sticky; top: calc(var(--navbar-height) + 1rem); }
@media (max-width: 991.98px) {
    .solo-guide .controls { position: static; }
}

.solo-guide .group {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--g-line);
}
.solo-guide .group:last-child { border-bottom: none; }
.solo-guide .group h3 {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--g-muted);
    font-weight: 700;
}

/* ---- Toggle rows ---- */
.solo-guide .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
}
.solo-guide .row .label { font-size: 0.95rem; font-weight: 600; }
.solo-guide .row .sub { font-size: 0.8rem; color: var(--g-muted); font-weight: 400; margin-top: 1px; }
.solo-guide .seg-wrap { padding: 0.45rem 0; }
.solo-guide .seg-wrap .label { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }

.solo-guide .switch { position: relative; width: 46px; height: 26px; flex: none; cursor: pointer; }
.solo-guide .switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.solo-guide .slider {
    position: absolute; inset: 0;
    background: rgba(154, 167, 181, 0.20);
    border: 1px solid var(--g-line);
    border-radius: 999px;
    transition: 0.18s;
}
.solo-guide .slider:before {
    content: ""; position: absolute;
    height: 18px; width: 18px; left: 3px; top: 3px;
    background: var(--g-off); border-radius: 50%;
    transition: 0.18s;
}
.solo-guide .switch input:checked + .slider { background: var(--g-accent-soft); border-color: var(--g-accent); }
.solo-guide .switch input:checked + .slider:before { transform: translateX(20px); background: var(--g-accent-strong); }
.solo-guide .switch input:disabled + .slider { opacity: 0.55; cursor: not-allowed; }
.solo-guide .switch input:focus-visible + .slider {
    box-shadow: 0 0 0 0.2rem rgba(var(--pendax-accent-rgb), 0.35);
}

/* ---- Segmented control ---- */
.solo-guide .seg {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem;
    background: var(--g-panel-2);
    padding: 0.3rem; border-radius: 0.6rem;
    border: 1px solid var(--g-line);
}
.solo-guide .seg--stack { grid-template-columns: 1fr; }
.solo-guide .seg button {
    background: transparent; border: none; color: var(--g-muted);
    padding: 0.6rem 0.6rem; border-radius: 0.45rem;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
    transition: 0.15s; text-align: center;
}
.solo-guide .seg--stack button { text-align: left; }
.solo-guide .seg button.active { background: var(--g-accent); color: var(--pendax-ink); }
.solo-guide .seg button:not(.active):hover { color: var(--g-accent-strong); }

/* ---- Recommendation ---- */
.solo-guide .guide-result { min-width: 0; }
.solo-guide .rec {
    background: var(--g-ok-soft);
    border: 1px solid var(--g-ok-line);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem;
}
.solo-guide .rec-eyebrow {
    display: inline-block;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: #1f6b44; margin-bottom: 0.35rem;
}
.solo-guide .rec-name { margin: 0 0 0.4rem; font-size: 1.5rem; color: var(--g-text); }
.solo-guide .rec-desc { margin: 0; color: var(--g-muted); font-size: 0.95rem; }

.solo-guide .rec-source {
    display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; align-items: baseline;
    margin-top: 1rem; padding: 0.85rem 1.1rem;
    background: var(--g-panel-2); border: 1px solid var(--g-line);
    border-radius: var(--g-radius);
}
.solo-guide .rec-source .k {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--g-muted);
}
.solo-guide .rec-source .v { font-size: 0.92rem; font-weight: 600; color: var(--g-text); }

/* ---- Accessory checklist ---- */
.solo-guide .rec-block { margin-top: 1.1rem; }
.solo-guide .rec-h {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--g-muted); margin-bottom: 0.6rem;
}
.solo-guide .acc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.solo-guide .acc-list li {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.55rem 0.85rem; border-radius: var(--g-radius);
    border: 1px solid var(--g-line); background: var(--g-panel);
}
.solo-guide .acc-list .mk {
    width: 22px; height: 22px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 0.78rem; font-weight: 800;
}
.solo-guide .acc-list li.req .mk { background: var(--g-accent); color: var(--pendax-ink); }
.solo-guide .acc-list li.chosen .mk { background: var(--g-ok); color: #fff; }
.solo-guide .acc-list .lab { flex: 1; font-weight: 600; font-size: 0.92rem; }
.solo-guide .acc-list .tag {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase; color: var(--g-muted);
}
.solo-guide .acc-list li.req .tag { color: var(--g-accent-strong); }
.solo-guide .acc-list li.chosen .tag { color: #1f6b44; }
.solo-guide .acc-legend { font-size: 0.78rem; color: var(--g-muted); margin: 0.6rem 0 0; line-height: 1.5; }

/* ---- ESG badge ---- */
.solo-guide .g-esg {
    display: flex; gap: 0.75rem; align-items: flex-start;
    margin-top: 1.1rem; padding: 0.85rem 1.1rem;
    border-radius: var(--g-radius); border: 1px solid; font-size: 0.9rem;
}
.solo-guide .g-esg.yes { background: var(--g-ok-soft); border-color: var(--g-ok-line); color: #1f6b44; }
.solo-guide .g-esg.no { background: var(--g-panel-2); border-color: var(--g-line); color: var(--g-muted); }
.solo-guide .g-esg .mk { font-weight: 800; flex: none; }
.solo-guide .g-esg strong { color: inherit; }

/* ---- Notes / warnings ---- */
.solo-guide .g-note {
    margin-top: 0.75rem; padding: 0.8rem 1.05rem;
    border-radius: var(--g-radius); font-size: 0.88rem;
    border: 1px solid; line-height: 1.55;
}
.solo-guide .g-note.info { background: var(--g-panel-2); border-color: var(--g-line); color: var(--g-muted); }
.solo-guide .g-note.warn { background: #fbe7d2; border-color: #e0a86a; color: #8a5d05; }

/* ---- Specification box ---- */
.solo-guide .spec {
    margin-top: 1.4rem; padding: 1.2rem 1.35rem;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--g-accent);
    background: rgba(var(--pendax-accent-rgb), 0.06);
}
.solo-guide .spec-title { font-weight: 800; font-size: 1.05rem; }
.solo-guide .spec-hint { font-size: 0.82rem; margin-bottom: 0.85rem; }
.solo-guide .spec-body { display: grid; gap: 0.4rem; }
.solo-guide .spec-row {
    display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem;
    font-size: 0.9rem; padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--g-line);
}
.solo-guide .spec-row:last-child { border-bottom: none; padding-bottom: 0; }
.solo-guide .spec-row .k { font-weight: 700; color: var(--g-muted); }
.solo-guide .spec-row .v { color: var(--g-text); }
@media (max-width: 459.98px) {
    .solo-guide .spec-row { grid-template-columns: 1fr; gap: 0.1rem; }
}
.solo-guide .spec-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.1rem; }

/* ---- Callout (weather/light tip) ---- */
.solo-guide .guide-callout {
    display: flex; gap: 0.85rem; align-items: flex-start;
    padding: 1rem 1.25rem; border-radius: var(--g-radius);
    background: rgba(var(--pendax-accent-rgb), 0.10);
    border: 1px solid rgba(var(--pendax-accent-rgb), 0.4);
    color: var(--g-text); max-width: 52rem;
}
.solo-guide .guide-callout i { color: var(--g-accent-strong); font-size: 1.25rem; flex: none; margin-top: 0.1rem; }

.solo-guide .matrix-foot { margin-top: 2rem; font-size: 0.82rem; line-height: 1.6; }
.solo-guide .matrix-foot strong { color: var(--ink); }

/* ---- "Guiden fortsätter nedan" transition + jump links ---- */
.solo-guide .guide-readmore {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--g-line);
    text-align: center;
}
.solo-guide .guide-readmore > i {
    font-size: 1.85rem;
    color: var(--g-accent-strong);
    display: block;
    animation: guide-bounce 1.8s ease-in-out infinite;
}
.solo-guide .guide-readmore__title {
    font-weight: 800;
    font-size: 1.15rem;
    margin-top: 0.35rem;
}
.solo-guide .guide-readmore p { max-width: 40rem; margin: 0.4rem auto 0; }
.solo-guide .guide-jump {
    display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
    margin-top: 1.2rem;
}
.solo-guide .guide-jump a {
    background: var(--g-panel); border: 1px solid var(--g-line);
    color: var(--g-text); text-decoration: none;
    padding: 0.45rem 0.95rem; border-radius: 999px;
    font-size: 0.85rem; font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.solo-guide .guide-jump a:hover {
    border-color: var(--g-accent); color: var(--g-accent-strong); box-shadow: var(--shadow-sm);
}
@keyframes guide-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) {
    .solo-guide .guide-readmore > i { animation: none; }
}

/* ---- EN 54 relationsband (brandlarmssektion, utanför .solo-guide) ---- */
.en54-relation {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0 0 1.15rem;
}
.en54-node {
    flex: 1 1 0;
    min-width: 9rem;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
}
.en54-node small {
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}
.en54-node--core {
    border-color: rgba(var(--pendax-accent-rgb), 0.55);
    background: rgba(var(--pendax-accent-rgb), 0.10);
    color: var(--pendax-accent-strong);
}
.en54-node--core small { color: var(--pendax-accent-strong); }
.en54-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    font-size: 1.15rem;
}
@media (max-width: 575.98px) {
    .en54-relation { flex-direction: column; }
    .en54-arrow { transform: rotate(90deg); }
}

/* Start-point line on building cards (used outside .solo-guide too) */
.guide-startpoint {
    font-size: 0.85rem; font-weight: 600;
    color: var(--pendax-accent-strong);
    margin-top: 0.5rem;
}

/* Print: show only the specification */
@media print {
    body > *:not(.section):not(.public-print-header) { display: none !important; }
    .navbar, .site-footer, .presets, .controls, .matrix-foot,
    .rec-source, .rec-block, .g-esg, #rec-notes, .spec-actions { display: none !important; }
    .solo-guide .spec { border: 1px solid #000; background: #fff; }

    body.print-spec-only .public-print-header,
    body.print-spec-only > .section:not(.solo-guide-print-section) {
        display: none !important;
    }

    body.print-spec-only .solo-guide-print-section {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        background: #fff !important;
    }

    body.print-spec-only .solo-guide-print-section > .container > h2,
    body.print-spec-only .solo-guide-print-section > .container > p,
    body.print-spec-only .solo-guide .presets,
    body.print-spec-only .solo-guide .controls,
    body.print-spec-only .solo-guide .rec,
    body.print-spec-only .solo-guide .rec-source,
    body.print-spec-only .solo-guide .rec-block,
    body.print-spec-only .solo-guide .g-esg,
    body.print-spec-only .solo-guide #rec-notes,
    body.print-spec-only .solo-guide .spec-hint,
    body.print-spec-only .solo-guide .spec-actions {
        display: none !important;
    }

    body.print-spec-only .solo-guide .guide-grid,
    body.print-spec-only .solo-guide .guide-result,
    body.print-spec-only .solo-guide .spec,
    body.print-spec-only .solo-guide .spec-body {
        display: block !important;
    }

    body.print-spec-only .solo-guide .spec {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: #fff !important;
    }

    body.print-spec-only .solo-guide .spec-title {
        margin-bottom: 0.8rem;
        font-size: 16pt;
    }
}
