/**
 * Gastoro Consent — Gestaltung im Gastoro-Look.
 *
 * Farben aus dem Portal: Türkis als Aktionsfarbe, warmes Dunkelbraun für Text.
 * "Alle ablehnen" ist bewusst genauso gross und genauso prominent wie
 * "Alle akzeptieren" — alles andere ist rechtlich angreifbar.
 */

.gc-root { position: relative; z-index: 999999; }
.gc-root[hidden] { display: none; }

:root {
    --gc-accent: #38b6ab;
    --gc-accent-dark: #2d948b;
    --gc-text: #2f2a26;
    --gc-muted: #6b625b;
    --gc-surface: #ffffff;
    --gc-line: #e6e1dc;
    --gc-radius: 10px;
}

.gc-backdrop {
    position: fixed; inset: 0;
    background: rgba(29, 25, 22, .55);
    z-index: 999998;
}
.gc-backdrop[hidden] { display: none; }

/* ---------------------------------------------------------------- Banner */

.gc-banner {
    position: fixed;
    left: 50%; bottom: 20px;
    transform: translateX(-50%);
    width: min(680px, calc(100vw - 32px));
    background: var(--gc-surface);
    color: var(--gc-text);
    border-radius: var(--gc-radius);
    box-shadow: 0 12px 40px rgba(29, 25, 22, .22);
    padding: 24px;
    z-index: 999999;
    font-size: 15px;
    line-height: 1.55;
}
.gc-banner[hidden] { display: none; }

.gc-title { margin: 0 0 8px; font-size: 19px; font-weight: 700; color: var(--gc-text); }
.gc-text { margin: 0 0 18px; color: var(--gc-muted); }

.gc-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.gc-btn {
    flex: 1 1 auto;
    min-width: 150px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

/* Das Theme (Woodmart) gestaltet <button> mit spezifischeren Regeln als
   unsere Klassen. Deshalb hier bewusst über .gc-root verschachtelt und mit
   !important auf den Farben — sonst gewinnt das Theme und der Knopf wird grau.
   Betroffen sind nur Farbe und Rahmen, nicht Grösse oder Anordnung. */

.gc-root .gc-btn,
.gc-root button.gc-btn {
    background-image: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Zustimmen: Gastoro-Türkis mit weisser Schrift. */
.gc-root .gc-btn-primary,
.gc-root button.gc-btn-primary {
    background-color: var(--gc-accent, #38b6ab) !important;
    border-color: var(--gc-accent, #38b6ab) !important;
    color: #fff !important;
}
.gc-root .gc-btn-primary:hover,
.gc-root button.gc-btn-primary:hover {
    background-color: var(--gc-accent-dark, #2d948b) !important;
    border-color: var(--gc-accent-dark, #2d948b) !important;
    color: #fff !important;
}

/* Ablehnen: neutral, aber bewusst GLEICH GROSS und gleich auffindbar.
   Ein kleiner grauer Ablehnen-Link neben einem grossen Zustimmen-Knopf ist
   der häufigste Abmahngrund bei Cookie-Bannern. Farbe darf sich also
   unterscheiden, Grösse und Platzierung nicht. */
.gc-root .gc-btn-reject,
.gc-root button.gc-btn-reject {
    background-color: #fff !important;
    color: var(--gc-text, #2f2a26) !important;
    border-color: #bdb5ae !important;
}
.gc-root .gc-btn-reject:hover,
.gc-root button.gc-btn-reject:hover {
    background-color: #f7f5f3 !important;
    border-color: var(--gc-text, #2f2a26) !important;
}

.gc-root .gc-btn-ghost,
.gc-root button.gc-btn-ghost {
    background-color: transparent !important;
    border-color: var(--gc-line, #e6e1dc) !important;
    color: var(--gc-muted, #6b625b) !important;
    flex: 0 1 auto;
}
.gc-root .gc-btn-ghost:hover,
.gc-root button.gc-btn-ghost:hover {
    border-color: var(--gc-muted, #6b625b) !important;
    color: var(--gc-text, #2f2a26) !important;
}

.gc-links { margin: 14px 0 0; font-size: 13px; }
.gc-links a { color: var(--gc-muted); text-decoration: underline; margin-right: 14px; }

/* ----------------------------------------------------------- Einstellungen */

.gc-settings {
    position: fixed;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(620px, calc(100vw - 32px));
    max-height: min(82vh, 760px);
    display: flex; flex-direction: column;
    background: var(--gc-surface);
    color: var(--gc-text);
    border-radius: var(--gc-radius);
    box-shadow: 0 20px 60px rgba(29, 25, 22, .3);
    z-index: 999999;
}
.gc-settings[hidden] { display: none; }

.gc-settings-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--gc-line);
}
.gc-settings-head h2 { margin: 0; font-size: 18px; font-weight: 700; }

.gc-close {
    background: none; border: 0; font-size: 26px; line-height: 1;
    color: var(--gc-muted); cursor: pointer; padding: 0 4px;
}
.gc-close:hover { color: var(--gc-text); }

.gc-settings-body { padding: 8px 24px 16px; overflow-y: auto; }

.gc-category { padding: 16px 0; border-bottom: 1px solid var(--gc-line); }
.gc-category:last-child { border-bottom: 0; }

.gc-category-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gc-category-label { font-weight: 600; font-size: 15px; }
.gc-category-text { margin: 8px 0 0; font-size: 13.5px; color: var(--gc-muted); line-height: 1.5; }
.gc-required { font-size: 12px; color: var(--gc-muted); white-space: nowrap; }

/* Schalter */
.gc-switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.gc-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

.gc-slider {
    position: relative; flex: 0 0 auto;
    width: 44px; height: 24px;
    background: #cfc8c2; border-radius: 999px;
    transition: background-color .15s ease;
}
.gc-slider::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: transform .15s ease;
}
.gc-switch input:checked + .gc-slider { background: var(--gc-accent); }
.gc-switch input:checked + .gc-slider::after { transform: translateX(20px); }
.gc-switch input:disabled + .gc-slider { background: var(--gc-accent); opacity: .45; }
.gc-switch input:focus-visible + .gc-slider { outline: 2px solid var(--gc-accent-dark); outline-offset: 2px; }

.gc-settings-foot {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding: 16px 24px; border-top: 1px solid var(--gc-line);
}

/* Der Widerrufs-Knopf, etwa im Footer */
.gc-open-settings {
    background: none; border: 0; padding: 0;
    color: inherit; font: inherit; text-decoration: underline; cursor: pointer;
}

body.gc-locked { overflow: hidden; }

@media (max-width: 560px) {
    .gc-banner { bottom: 0; border-radius: var(--gc-radius) var(--gc-radius) 0 0; width: 100vw; }
    .gc-btn { flex: 1 1 100%; }
    .gc-settings { max-height: 92vh; }
}

@media (prefers-reduced-motion: reduce) {
    .gc-btn, .gc-slider, .gc-slider::after { transition: none; }
}
