/* ==========================================================================
   Klaro Cookie Consent — Dark Luxury Theme for Strahlkraft40+
   Overrides klaro-no-css.js default styles
   Palette: richBlack #121212, deepGreen #0E3A28, gold #D4AF37, ivory #FAFAF5
   ========================================================================== */

/* ---------- Overlay backdrop ---------- */
.klaro .cookie-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.klaro .cookie-modal .cm-bg,
.klaro .context-notice .cm-bg,
.klaro .cookie-notice .cn-bg {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1 !important;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* ---------- Notice bar (bottom banner) ---------- */
.klaro .cookie-notice {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background: linear-gradient(180deg, #1a2e22, #121212) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Montserrat', sans-serif;
    padding: 20px 24px !important;
}

.klaro .cookie-notice .cn-body {
    max-width: 1100px;
    margin: 0 auto;
    color: #FAFAF5;
}

.klaro .cookie-notice .cn-body p {
    color: rgba(250, 250, 245, 0.7);
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px;
}

.klaro .cookie-notice .cn-body p a {
    color: #D4AF37;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.klaro .cookie-notice .cn-body p a:hover {
    color: #E8C44A;
}

/* ---------- Notice buttons ---------- */
.klaro .cookie-notice .cn-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Accept button (gold) */
.klaro .cookie-notice .cm-btn.cm-btn-success {
    background: linear-gradient(135deg, #D4AF37, #C5A059) !important;
    color: #121212 !important;
    border: none !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.25);
}

.klaro .cookie-notice .cm-btn.cm-btn-success:hover {
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.45);
    transform: translateY(-1px);
}

/* Decline button (ghost) */
.klaro .cookie-notice .cm-btn.cm-btn-danger,
.klaro .cookie-notice .cm-btn.cn-decline {
    background: transparent !important;
    color: rgba(250, 250, 245, 0.5) !important;
    border: 1px solid rgba(250, 250, 245, 0.15) !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.klaro .cookie-notice .cm-btn.cm-btn-danger:hover,
.klaro .cookie-notice .cm-btn.cn-decline:hover {
    border-color: rgba(250, 250, 245, 0.3) !important;
    color: rgba(250, 250, 245, 0.8) !important;
}

/* "Learn more" / settings link */
.klaro .cookie-notice .cm-link {
    color: rgba(250, 250, 245, 0.4) !important;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    transition: color 0.2s;
}

.klaro .cookie-notice .cm-link:hover {
    color: #D4AF37 !important;
}

/* ---------- Modal (settings panel) ---------- */
.klaro .cookie-modal .cm-modal {
    position: relative !important;
    z-index: 2 !important;
    background: linear-gradient(180deg, #1a2e22, #121212) !important;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    font-family: 'Montserrat', sans-serif;
    max-width: 580px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    color: #FAFAF5;
}

/* Header */
.klaro .cookie-modal .cm-modal .cm-header {
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
    padding: 28px 32px 20px;
    position: relative;
}

.klaro .cookie-modal .cm-modal .cm-header h1,
.klaro .cookie-modal .cm-modal .cm-header h1 .title {
    font-family: 'Cormorant Garamond', serif;
    color: #FAFAF5 !important;
    font-size: 26px;
    font-weight: 500;
    margin: 0 0 12px;
}

.klaro .cookie-modal .cm-modal .cm-header p {
    color: rgba(250, 250, 245, 0.6);
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.klaro .cookie-modal .cm-modal .cm-header p a {
    color: #D4AF37;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.klaro .cookie-modal .cm-modal .cm-header p a:hover {
    color: #E8C44A;
}

/* Close button */
.klaro .cookie-modal .cm-modal .cm-header button.hide {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.klaro .cookie-modal .cm-modal .cm-header button.hide:hover {
    opacity: 1;
}

.klaro .cookie-modal .cm-modal .cm-header button.hide svg line {
    stroke: #FAFAF5;
    stroke-width: 2;
}

/* Body */
.klaro .cookie-modal .cm-modal .cm-body {
    padding: 24px 32px;
    color: rgba(250, 250, 245, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.klaro .cookie-modal .cm-modal .cm-body p {
    color: rgba(250, 250, 245, 0.7);
    margin: 0 0 8px;
}

/* Purpose groups (Analyse, Marketing) */
.klaro .cookie-modal .cm-purposes {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.klaro .cookie-modal .cm-purpose {
    background: rgba(250, 250, 245, 0.03);
    border: 1px solid rgba(250, 250, 245, 0.06);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 14px !important;
    list-style: none !important;
}

.klaro .cookie-modal .cm-purpose:last-child {
    margin-bottom: 0 !important;
}

/* Purpose title labels */
.klaro .cookie-modal .cm-list-title {
    color: #FAFAF5 !important;
    font-weight: 600;
    font-size: 15px;
}

.klaro .cookie-modal .cm-list-description {
    color: rgba(250, 250, 245, 0.5) !important;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 4px;
}

.klaro .cookie-modal .cm-list-description span {
    color: rgba(250, 250, 245, 0.5) !important;
}

/* Required badge */
.klaro .cookie-modal .cm-required {
    color: #D4AF37 !important;
    font-size: 11px;
    font-weight: 500;
    margin-left: 6px;
}

/* Opt-out badge */
.klaro .cookie-modal .cm-opt-out {
    color: rgba(250, 250, 245, 0.3) !important;
    font-size: 11px;
    margin-left: 6px;
}

/* Toggle switch */
.klaro .cookie-modal .cm-list-label,
.klaro .cookie-notice .cm-list-label {
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    cursor: pointer;
}

.klaro .cookie-modal .cm-switch,
.klaro .cookie-notice .cm-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    min-width: 42px;
    height: 24px;
    margin-left: auto;
}

/* Default slider: OFF state (grey) — .active class is always present in Klaro v0.7, ignore it */
.klaro .cookie-modal .cm-list-label .slider,
.klaro .cookie-notice .cm-list-label .slider,
.klaro .cookie-modal .cm-list-label .slider.active,
.klaro .cookie-notice .cm-list-label .slider.active {
    position: absolute;
    inset: 0;
    background: rgba(250, 250, 245, 0.12) !important;
    border-radius: 24px;
    transition: background 0.3s;
}

.klaro .cookie-modal .cm-list-label .slider::before,
.klaro .cookie-notice .cm-list-label .slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #FAFAF5;
    border-radius: 50%;
    transition: transform 0.3s;
}

/* ON state: based on checkbox :checked (not .active class) */
.klaro .cookie-modal .cm-list-input:checked + .cm-list-label .slider,
.klaro .cookie-notice .cm-list-input:checked + .cm-list-label .slider,
.klaro .cookie-modal .cm-list-input.required + .cm-list-label .slider,
.klaro .cookie-notice .cm-list-input.required + .cm-list-label .slider {
    background: #D4AF37 !important;
}

.klaro .cookie-modal .cm-list-input:checked + .cm-list-label .slider::before,
.klaro .cookie-notice .cm-list-input:checked + .cm-list-label .slider::before,
.klaro .cookie-modal .cm-list-input.required + .cm-list-label .slider::before,
.klaro .cookie-notice .cm-list-input.required + .cm-list-label .slider::before {
    transform: translateX(18px);
}

/* Visually hide checkboxes but keep them interactive for Klaro's JS */
.klaro .cookie-modal .cm-list-input,
.klaro .cookie-notice .cm-list-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

/* Service sub-items inside purpose groups */
.klaro .cookie-modal .cm-services {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(250, 250, 245, 0.06);
}

.klaro .cookie-modal .cm-services .cm-content {
    list-style: none !important;
    padding: 0 !important;
    margin: 8px 0 0 !important;
}

.klaro .cookie-modal .cm-services .cm-service {
    padding: 10px 0 6px;
}

.klaro .cookie-modal .cm-services .cm-caret a {
    color: rgba(250, 250, 245, 0.35) !important;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.klaro .cookie-modal .cm-services .cm-caret a:hover {
    color: #D4AF37 !important;
}

/* Purpose description text */
.klaro .cookie-modal .cm-purpose > div p {
    color: rgba(250, 250, 245, 0.45);
    font-size: 12px;
    margin: 4px 0 0;
}

/* "Zweck:" label inside services */
.klaro .cookie-modal .cm-services p.purposes {
    color: rgba(250, 250, 245, 0.3) !important;
    font-size: 11px;
    margin: 4px 0 0;
}

/* ---------- Modal footer ---------- */
.klaro .cookie-modal .cm-modal .cm-footer {
    border-top: 1px solid rgba(212, 175, 55, 0.12);
    padding: 20px 32px 28px;
}

.klaro .cookie-modal .cm-footer-buttons {
    display: flex !important;
    gap: 12px;
    flex-wrap: wrap;
}

/* Primary CTA — "Alle akzeptieren" */
.klaro .cookie-modal .cm-btn.cm-btn-accept-all {
    background: linear-gradient(135deg, #D4AF37, #C5A059) !important;
    color: #121212 !important;
    border: none !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 13px 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.25);
    order: 1;
}

.klaro .cookie-modal .cm-btn.cm-btn-accept-all:hover {
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.45);
    transform: translateY(-1px);
}

/* Secondary — "Ausgewaehlte akzeptieren" (also has .cm-btn-success, so use higher specificity) */
.klaro .cookie-modal .cm-btn.cm-btn-success.cm-btn-accept {
    background: transparent !important;
    color: #D4AF37 !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 13px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none !important;
    order: 2;
}

.klaro .cookie-modal .cm-btn.cm-btn-success.cm-btn-accept:hover {
    border-color: #D4AF37 !important;
    background: rgba(212, 175, 55, 0.12) !important;
    color: #D4AF37 !important;
    box-shadow: none !important;
}

/* Tertiary — "Nur Notwendige" */
.klaro .cookie-modal .cm-btn.cm-btn-decline,
.klaro .cookie-modal .cm-btn.cm-btn-danger.cn-decline {
    background: transparent !important;
    color: rgba(250, 250, 245, 0.4) !important;
    border: 1px solid rgba(250, 250, 245, 0.1) !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 13px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    order: 3;
}

.klaro .cookie-modal .cm-btn.cm-btn-decline:hover,
.klaro .cookie-modal .cm-btn.cm-btn-danger.cn-decline:hover {
    border-color: rgba(250, 250, 245, 0.25) !important;
    color: rgba(250, 250, 245, 0.7) !important;
}

/* Fallback for any other success/danger buttons in modal */
.klaro .cookie-modal .cm-btn.cm-btn-success {
    background: linear-gradient(135deg, #D4AF37, #C5A059) !important;
    color: #121212 !important;
    border: none !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 13px 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.klaro .cookie-modal .cm-btn.cm-btn-success:hover {
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.45);
}

.klaro .cookie-modal .cm-btn.cm-btn-danger {
    background: transparent !important;
    color: rgba(250, 250, 245, 0.4) !important;
    border: 1px solid rgba(250, 250, 245, 0.1) !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    padding: 13px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.klaro .cookie-modal .cm-btn.cm-btn-danger:hover {
    border-color: rgba(250, 250, 245, 0.25) !important;
    color: rgba(250, 250, 245, 0.7) !important;
}

/* ---------- Scrollbar (modal) ---------- */
.klaro .cookie-modal .cm-modal::-webkit-scrollbar {
    width: 6px;
}

.klaro .cookie-modal .cm-modal::-webkit-scrollbar-track {
    background: transparent;
}

.klaro .cookie-modal .cm-modal::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .klaro .cookie-notice {
        padding: 16px 16px !important;
    }

    .klaro .cookie-notice .cn-buttons {
        flex-direction: column;
        width: 100%;
    }

    .klaro .cookie-notice .cm-btn {
        width: 100%;
        text-align: center;
    }

    .klaro .cookie-modal .cm-modal {
        margin: 10px;
        border-radius: 12px;
        max-height: 90vh;
    }

    .klaro .cookie-modal .cm-modal .cm-header {
        padding: 20px 20px 16px;
    }

    .klaro .cookie-modal .cm-modal .cm-body {
        padding: 16px 20px;
    }

    .klaro .cookie-modal .cm-modal .cm-footer {
        padding: 16px 20px 20px;
    }

    .klaro .cookie-modal .cm-footer-buttons {
        flex-direction: column;
    }

    .klaro .cookie-modal .cm-footer-buttons .cm-btn {
        width: 100%;
        text-align: center;
    }
}
