/* Cookie Consent Banner – Osnaboard Dark */

.cookie-option-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #232a36;
    border-radius: 12px;
    padding: 0.7rem 1.2rem;
    margin-bottom: 0.7rem;
    font-size: 1rem;
    /* verhindert Baseline/Inline-Abstand, Icon bekommt eigene Größe */
    font-weight: 500;
    color: #f3f6fa;
    box-shadow: 0 2px 8px 0 rgba(30, 32, 41, 0.05);
    border: 1.5px solid #283143;
}

.cookie-option-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--osnaboard-s-heading, #3b82f6);
    cursor: pointer;
    margin-left: 1.2rem;
}

.cookie-option-row input[type="checkbox"][disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 700px) {
    .cookie-option-row {
        font-size: 0.97rem;
        padding: 0.6rem 0.7rem;
    }

    .cookie-option-row input[type="checkbox"] {
        width: 26px;
        height: 26px;
        /* zusätzlicher Ring zur besseren Erkennbarkeit auf dunklem Grund */
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
        /* größere Touch-Fläche ohne optische Vergrößerung vermeiden */
        /* Hinweis: border wird von nativen Checkboxen je nach Browser evtl. ignoriert */
    }

    .cookie-option-row input[type="checkbox"]:checked {
        /* sichtbarer Ring im aktiven Zustand */
        box-shadow: 0 0 0 3px rgba(45, 200, 200, 0.45);
    }

    .cookie-option-row input[type="checkbox"]:focus-visible {
        outline: 3px solid var(--osnaboard-s-accent, #3b82f6);
        outline-offset: 2px;
    }

    .cookie-option-row input[type="checkbox"][disabled] {
        opacity: 0.85;
    }
}

.cookie-consent-banner {
    position: fixed;
    left: 32px;
    right: 32px;
    bottom: 32px;
    z-index: 9999;
    background: rgba(24, 26, 32, 0.98);
    border: 2.5px solid var(--osnaboard-s-heading, #3b82f6);
    box-shadow: 0 8px 48px 0 rgba(30, 32, 41, 0.32);
    font-family: 'Inter', Arial, sans-serif;
    padding: 0;
    margin: 0;
    border-radius: 32px;
    max-width: 520px;
    min-width: 300px;
    transition: box-shadow 0.3s, transform 0.3s;
    animation: osnaboard-fadein-up 0.7s cubic-bezier(.4, 1.6, .6, 1);
}

@media (max-width: 700px) {
    .cookie-consent-banner {
        left: 2vw;
        right: 2vw;
        bottom: 2vw;
        max-width: 98vw;
        min-width: unset;
        border-radius: 18px;
    }
}

@keyframes osnaboard-fadein-up {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

.cookie-floating-btn {
    position: fixed;
    left: 32px;
    bottom: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    border: 2.5px solid var(--osnaboard-s-heading, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    transition: border-color 0.18s, background 0.18s, transform 0.16s;
    animation: floatingBtnFadeIn 0.5s cubic-bezier(.4, 1.6, .6, 1);
}

.cookie-floating-btn .fa-fingerprint {
    font-size: 2.2rem;
    color: var(--osnaboard-s-heading, #3b82f6);
    transition: color 0.18s;
}

.cookie-floating-btn:hover,
.cookie-floating-btn:focus {
    background: var(--osnaboard-s-heading, #3b82f6);
    border-color: var(--osnaboard-s-heading, #3b82f6);
    transform: scale(1.07);
}

@media (max-width: 700px) {
    .cookie-floating-btn {
        left: 2vw;
        bottom: 2vw;
        width: 48px;
        height: 48px;
    }
}

@keyframes floatingBtnFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(40px);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

.cookie-consent-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    color: #fff;
    text-align: left;
}

.cookie-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
    justify-content: flex-start;
}

.cookie-tab-btn {
    border: none;
    background: #232a36;
    color: #c6d4ee;
    padding: 0.5rem 1.3rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    margin-right: 0.7rem;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    position: relative;
    outline: none;
}

.cookie-tab-btn.active {
    background: transparent;
    border: 2px solid var(--osnaboard-s-success, #2d7f83);
    color: var(--osnaboard-s-success, #2d7f83);
    box-shadow: none;
    z-index: 2;
}

.cookie-tab-btn.active:hover,
.cookie-tab-btn.active:focus {
    background: var(--osnaboard-s-success, #2d7f83);
    color: #fff;
    border-color: var(--osnaboard-s-success, #2d7f83);
}


.cookie-tab-content {
    animation: fadeinTab 0.32s cubic-bezier(.4, 1.6, .6, 1);
}

@keyframes fadeinTab {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

.cookie-consent-content h3 {
    margin-top: 0;
    color: var(--osnaboard-s-heading, #3b82f6);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

.cookie-consent-content p {
    font-size: 1.08rem;
    margin-bottom: 1.2rem;
    color: #e5e7eb;
}

.cookie-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.cookie-options label {
    font-size: 1rem;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cookie-btn-revoke {
    border: 2px solid #ef4444 !important;
    background: #ef4444 !important;
    color: #fff !important;
    padding: 0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    display: grid;
    place-items: center;
    width: 44px !important;
    min-width: 44px;
    min-height: 44px;
    height: 44px !important;
    box-sizing: border-box;
    line-height: 1;
    text-align: center;
    aspect-ratio: 1 / 1;
    box-shadow: none;
}

.cookie-btn-revoke i {
    pointer-events: none;
    color: #fff !important;
    display: block;
    line-height: 1;
    font-size: 1.1rem;
    vertical-align: middle;
}

@media (max-width: 900px) {
    #cookieConsentBanner .cookie-btn-revoke {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px;
        min-height: 42px;
        font-size: 0 !important;
        padding: 0;
        box-sizing: border-box;
        aspect-ratio: 1 / 1;
    }

    #cookieConsentBanner .cookie-btn-revoke i {
        font-size: 1.1rem;
    }
}

.cookie-btn {
    padding: 0.6rem 1.4rem;
    border-radius: var(--osnaboard-button-br, 8px);
    border: none;
    background: var(--osnaboard-s-accent, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(30, 32, 41, 0.12);
}

.cookie-btn-primary {
    background: var(--osnaboard-s-heading, #3b82f6);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cookie-btn:hover {
    background: var(--osnaboard-s-accent, #2563eb);
    color: #fff;
    filter: brightness(1.08);
}

.cookie-btn-primary:hover {
    background: #2563eb;
}

/* Accessibility Widget – TTS-Steuerung: quadratische Buttons */
#a11yTtsFieldset .cookie-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 700px) {
    #a11yTtsFieldset .cookie-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
}

@media (max-width: 700px) {
    .cookie-consent-content {
        max-width: 98vw;
        /* Angleichen an a11y-content: links/rechts 1.5rem */
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
}

/* Lightmode Styles */
body.lightmode .cookie-consent-banner {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--osnaboard-s-heading, #2563eb);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

body.lightmode .cookie-consent-content {
    color: var(--osnaboard-s-text, #111827);
}

body.lightmode .cookie-consent-content h3 {
    color: var(--osnaboard-s-heading, #2563eb);
}

body.lightmode .cookie-consent-content p,
body.lightmode #cookie-tab-details ul {
    color: var(--osnaboard-s-muted, #374151) !important;
}

body.lightmode .cookie-tab-btn {
    background: #f1f5f9;
    color: #334155;
}

body.lightmode .cookie-tab-btn:hover,
body.lightmode .cookie-tab-btn:focus {
    background: #e2e8f0;
    color: #1f2937;
}

body.lightmode .cookie-option-row {
    background: #f8fafc;
    border-color: #e5e7eb;
    color: #111827;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.lightmode .cookie-options label {
    color: #111827;
}

body.lightmode .cookie-btn {
    color: #fff;
}

body.lightmode .cookie-btn:hover {
    background: var(--osnaboard-s-accent, #2d7f83);
    filter: brightness(1.02);
}

body.lightmode .cookie-btn-primary {
    background: var(--osnaboard-s-heading, #2d7f83);
}

body.lightmode .cookie-floating-btn {
    border-color: #2d7f83;
    background: transparent;
}

body.lightmode .cookie-floating-btn .fa-fingerprint {
    color: #2d7f83;
}
