/*
 * Gerüstkalkulator — zusätzliche Styles zum Plugin.
 * Die Haupt-Styles liegen inline im Template (aus Original-HTML übernommen),
 * hier nur das, was Plugin-spezifisch dazukommt (Scoping + Cart-Button).
 */

.gkalk-wrap { max-width: 1600px; margin: 0 auto; }

/* ── Hero-Bereich: Titel + Gerüsttyp + Feature-Bullets ───────────────────── */
.gkalk-wrap .gkalk-hero {
    padding: 26px 20px 22px;
    text-align: center;
}
.gkalk-wrap .gkalk-hero-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.15;
    color: #1a1a1a;
    margin: 0 0 6px;
    letter-spacing: .01em;
}
.gkalk-wrap .gkalk-hero-title em {
    color: #1e87c8;
    font-style: normal;
}
.gkalk-wrap .gkalk-hero-type {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #2566c0;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.gkalk-wrap .gkalk-hero-features {
    list-style: none;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    max-width: 900px;
    font-family: 'Open Sans', sans-serif;
}
.gkalk-wrap .gkalk-hero-features li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: #444;
    line-height: 1.4;
}
.gkalk-wrap .gkalk-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e8f4fc;
    color: #1e87c8;
    font-size: .7rem;
    font-weight: 700;
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .gkalk-wrap .gkalk-hero-features { gap: 6px 14px; }
    .gkalk-wrap .gkalk-hero-features li { font-size: .75rem; }
}

/* Interaktiver SVG-Tooltip auf der Gerüstgrafik */
#scaffold-svg [data-gkalk-part] { cursor: help; transition: opacity .15s; }
#scaffold-svg [data-gkalk-part]:hover { opacity: .75; }
.gkalk-svg-tip {
    position: fixed;
    display: none;
    background: #2566c0;
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 6px 10px;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
    pointer-events: none;
    z-index: 9999;
    max-width: 280px;
    white-space: nowrap;
}

/* Versandkostenfrei-Hervorhebung innerhalb der Feature-Bullets */
.gkalk-wrap .gkalk-hero-features li.gkalk-shipping {
    font-weight: 700;
    color: #2566c0;
}
.gkalk-wrap .gkalk-hero-features li.gkalk-shipping .gkalk-check {
    background: #2566c0;
    color: #fff;
}

/* Linken Konfigurator-Bereich schmal halten, damit rechts Vorschau + Stückliste
   volle Breite bekommen. Das originale Template hatte "1fr 370px" — wir drehen
   das um: Konfig fest ca. 400px, Rest flexibel. */
.gkalk-wrap .layout {
    grid-template-columns: minmax(360px, 420px) 1fr !important;
    gap: 18px !important;
}
.gkalk-wrap .sidebar { padding-left: 0 !important; }

@media (max-width: 900px) {
    .gkalk-wrap .layout {
        grid-template-columns: 1fr !important;
    }
}

/* Full-Width-Page-Template: Content-Container auf volle Viewport-Breite ziehen
   und den Seitentitel "Giebel Test" etc. ausblenden, weil der Kalkulator einen
   eigenen Header mitbringt. */
.page-template-page-gkalk-fullwidth .entry-header,
.page-template-page-gkalk-fullwidth .wp-block-post-title,
.page-template-page-gkalk-fullwidth h1.entry-title { display: none; }
.page-template-page-gkalk-fullwidth .site-main,
.page-template-page-gkalk-fullwidth .content-area,
.page-template-page-gkalk-fullwidth .wp-site-blocks,
.page-template-page-gkalk-fullwidth main {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}
.page-template-page-gkalk-fullwidth .gkalk-wrap { max-width: none; }

/* Vorschau-Karte: nach dem JS-Move steht sie als erstes Element in der Sidebar.
   Kein sticky — die Grafik scrollt beim Runterscrollen mit, damit sie
   nicht über/hinter die Preistabelle rutscht. */
.gkalk-wrap .sidebar .vis-card-moved {
    margin-bottom: 14px;
}
.gkalk-wrap .sidebar .vis-card-moved .vis-wrap {
    min-height: auto;
    padding: 6px;
    background: #fff;
}
.gkalk-wrap .sidebar .vis-card-moved #scaffold-svg {
    width: 100%;
    height: auto;
    max-height: 520px;
    display: block;
}

/* Restlicher Rest des CSV-Upload-Blocks unsichtbar, falls irgendein Remnant
   (Labels ohne input) im gerenderten Markup stehen bleibt. */
.gkalk-wrap #csv-upload,
.gkalk-wrap label[for="csv-upload"],
.gkalk-wrap #csv-status {
    display: none !important;
}

.gkalk-cart-actions {
    display: flex; flex-direction: column; gap: 10px;
    padding: 14px 7px 4px;
    border-top: 1px solid #e0e0e0;
    margin-top: 10px;
}
.gkalk-cart-row {
    display: flex; align-items: center; gap: 14px;
    justify-content: flex-end;
}
.gkalk-cart-btn {
    background: #1e87c8; color: #fff;
    font-weight: 700; font-size: .9rem;
    padding: 10px 18px;
    border: 0; border-radius: 4px;
    cursor: pointer;
    transition: background .15s;
}
.gkalk-cart-btn:hover { background: #155d8a; }
.gkalk-cart-btn:disabled { opacity: .6; cursor: not-allowed; }
.gkalk-cart-hint { font-size: .72rem; color: #777; }

/* Frachtfrei-Progress: zeigt wieviel netto noch fehlt bis 5.000 € (kostenfreier Versand). */
.gkalk-sp {
    width: 100%;
    padding: 10px 14px;
    background: #f0f7fb;
    border: 1px solid #c8dff0;
    border-radius: 4px;
    box-sizing: border-box;
}
.gkalk-sp-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: .78rem;
    flex-wrap: wrap;
    gap: 8px;
}
.gkalk-sp-msg { color: #2566c0; font-weight: 600; }
.gkalk-sp-msg.achieved { color: #2e7d32; }
.gkalk-sp-target { color: #777; font-size: .72rem; }
.gkalk-sp-bar {
    height: 8px;
    background: #d8e4ee;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}
.gkalk-sp-fill {
    height: 100%;
    background: linear-gradient(90deg, #2566c0, #1e87c8);
    transition: width 0.4s ease-out;
    border-radius: 4px;
}
.gkalk-sp-fill.achieved {
    background: linear-gradient(90deg, #2e7d32, #43a047);
}
.gkalk-sp-scale {
    display: flex;
    justify-content: space-between;
    font-size: .7rem;
    color: #888;
    margin-top: 4px;
}
.gkalk-sp-scale strong { color: #2566c0; font-weight: 700; }
.gkalk-sp-scale .achieved { color: #2e7d32; }
