/* Cool Creative – Hinweise und Formularmeldungen.
   Gleiche Optik wie das Cookie-Banner (cookie-consent.css): dunkle Karte unten mittig,
   1px-Rahmen, 16px Ecken, Kanit, Pill-Buttons, Limettengrün als Akzent.
   Das Cookie-Banner selbst wird hier nicht verändert. */

.cc-notice-root {
    --cc-bg: #16181c;
    --cc-surface: #1f2228;
    --cc-border: #33373f;
    --cc-text: #e9e9e9;
    --cc-muted: #9aa0a8;
    --cc-primary: #c9f31d;
    --cc-primary-text: #101300;
    --cc-purple: #8e66ff;
    --cc-error: #ff8f7a;
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.cc-notice-root, .cc-notice-root * { box-sizing: border-box; }

.cc-notice {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 24px;
    margin: 0 auto;
    width: calc(100% - 40px);
    max-width: 560px;
    background: var(--cc-bg);
    border: 1px solid var(--cc-border);
    border-radius: 16px;
    padding: 22px 24px;
    z-index: 2147483645; /* unter dem Cookie-Banner, solange der Stapel darüber passt */
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .55);
    display: none;
}

.cc-notice.cc-open { display: block; }

.cc-notice__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 6px;
}

/* kleiner Statuspunkt statt großem Icon */
.cc-notice__dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 7px; /* mittig zur ersten Titelzeile */
    border-radius: 50%;
    background: var(--cc-purple);
}

.cc-notice[data-state="success"] .cc-notice__dot { background: var(--cc-primary); }
.cc-notice[data-state="error"] .cc-notice__dot,
.cc-notice[data-state="invalid"] .cc-notice__dot { background: var(--cc-error); }
.cc-notice[data-state="sending"] .cc-notice__dot { animation: cc-notice-pulse 1.1s ease-in-out infinite; }

.cc-notice-root .cc-notice__title {
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: .2px;
    line-height: 1.3;
    margin: 0;
}

.cc-notice-root .cc-notice__text {
    color: var(--cc-text);
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 0 20px;
}

.cc-notice__text a { color: var(--cc-primary); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

.cc-notice__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.cc-notice__actions:empty { display: none; }

/* Buttons wie im Cookie-Banner (.cc-btn), eigene Klasse damit nichts kollidiert */
.cc-nbtn {
    appearance: none;
    border: 1px solid var(--cc-border);
    background: transparent;
    color: var(--cc-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, transform .05s;
    line-height: 1;
}
.cc-nbtn:hover { border-color: #5a6069; }
.cc-nbtn:active { transform: translateY(1px); }
.cc-nbtn:focus-visible { outline: 2px solid var(--cc-primary); outline-offset: 2px; }

.cc-nbtn--primary {
    background: var(--cc-primary);
    border-color: var(--cc-primary);
    color: var(--cc-primary-text);
    font-weight: 600;
}
.cc-nbtn--primary:hover { background: #d6ff2e; border-color: #d6ff2e; }

@keyframes cc-notice-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.7); }
}

@media (max-width: 560px) {
    .cc-notice { padding: 18px 20px; bottom: 12px; width: calc(100% - 20px); }
    .cc-notice__actions { flex-direction: column; align-items: stretch; }
    .cc-nbtn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .cc-notice[data-state="sending"] .cc-notice__dot { animation: none; }
    .cc-nbtn { transition: none; }
}

/* ---------- Feldhinweise im Kontaktformular ---------- */

.cc-form {
    --cc-muted: #9aa0a8;
    --cc-error: #ff8f7a;
    --cc-primary: #c9f31d;
}

.cc-field-msg {
    display: block;
    margin: 0 0 22px;
    color: var(--cc-error);
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.cc-field-msg:empty { display: none; }

.cc-form [aria-invalid="true"] { border-bottom-color: var(--cc-error) !important; }

/* Fehlertext sitzt direkt unter der Linie des Feldes */
#contactForm input[aria-invalid="true"],
#contactForm textarea[aria-invalid="true"],
#contactForm select[aria-invalid="true"] { margin-bottom: 8px !important; }

/* Hinweis unter den Leistungs-Pills: vorab sichtbar, bei Fehler in Fehlerfarbe */
.cc-field-hint {
    display: block;
    margin-top: 12px;
    color: var(--cc-muted);
    font-size: 13px;
    line-height: 1.4;
}

.cc-field-hint.is-error { color: var(--cc-error); }

.services-container.is-invalid label.pill input + span { border-color: rgba(255, 143, 122, .6) !important; }

/* Pills: Checkbox bleibt per Tastatur erreichbar (statt display:none) */
label.pill input[type="checkbox"].pill__input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
    display: inline-block !important;
}

label.pill input[type="checkbox"].pill__input:focus-visible + span {
    outline: 2px solid var(--cc-primary);
    outline-offset: 3px;
}

/* Senden-Button während des Sendens */
.cc-form button[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* Newsletter: Fehlerrahmen am Eingabefeld */
.footer__subscribe input[aria-invalid="true"] { border-color: #ff8f7a !important; }

/* Statische Meldung auf /kontakt nach einem Formular-POST ohne JavaScript */
.cc-notice.cc-notice--static {
    position: static;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 40px;
    box-shadow: none;
}

/* Während ein Hinweis offen ist, verschwindet der "Nach oben"-Button (überlappt sonst die Karte) */
body.cc-notice-open .scroll-top {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Gesperrte Felder während des Sendens */
.cc-form [data-cc-locked] { opacity: .65; }

/* Honeypot-Feld (Spamschutz): für Menschen unsichtbar, aber nicht display:none */
.cc-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Breite Bildschirme: Hinweise unten rechts, damit der runde Senden-Button in der Mitte frei bleibt */
@media (min-width: 1200px) {
    .cc-notice:not(.cc-notice--static) {
        left: auto;
        right: 32px;
        margin: 0;
        width: 440px;
        max-width: calc(100% - 64px);
    }
}

/* Kein Platz über dem Cookie-Banner (kleine Handys, Querformat): Karten liegen vor dem Banner.
   Gleiche Ebene wie Banner und Cookie-Dialog; die Karten stehen im DOM danach. Ist der
   Cookie-Dialog offen, wird diese Klasse nicht gesetzt (Dialog bleibt oben). */
.cc-notice-root--front .cc-notice:not(.cc-notice--static) { z-index: 2147483647; }

/* Karten, die höher als der freie Platz sind, scrollen in sich (max-height setzt form-status.js) */
.cc-notice { overscroll-behavior: contain; }
