/*
 * VAIS Cookie-Einwilligung - Banner und Cookie-Erklaerung im Design von turn-systems.de
 * Farben: Hintergrund #303030, Akzent #c29019 (Gold), Hover #f7b15e
 * Gold-Buttons mit dunkler Schrift (Kontrast 6:1, WCAG AA).
 */

.vais-cc[hidden],
.vais-cc [hidden] {
    display: none !important;
}

.vais-cc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002; /* ueber der Altersabfrage (10000/10001) */
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #303030;
    border-top: 2px solid #c29019;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.55);
    color: #e5e5e5;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
}

.vais-cc *,
.vais-cc *::before,
.vais-cc *::after {
    box-sizing: border-box;
}

.vais-cc-inner {
    max-width: 1170px;
    margin: 0 auto;
    padding: 18px 16px 20px;
}

.vais-cc-layer {
    position: relative;
}

.vais-cc-title {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.vais-cc-title:focus {
    outline: none;
}

.vais-cc-text {
    margin: 0 0 8px;
}

.vais-cc-links {
    margin: 0 0 14px;
    font-size: 14px;
}

.vais-cc a,
.vais-cc-declaration a {
    color: #f7b15e;
    text-decoration: underline;
}

.vais-cc a:hover,
.vais-cc a:focus {
    color: #ffffff;
}

.vais-cc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.vais-cc-btn {
    display: inline-block;
    min-width: 170px;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid #c29019;
    border-radius: 4px;
    background: #c29019;
    color: #171717;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-shadow: none;
    cursor: pointer;
    float: none;
    transition: background-color 0.1s ease-in, border-color 0.1s ease-in;
}

.vais-cc-btn:hover {
    background: #f7b15e;
    border-color: #f7b15e;
    color: #171717;
}

.vais-cc-btn-secondary {
    background: transparent;
    border-color: #8a8a8a;
    color: #e5e5e5;
}

.vais-cc-btn-secondary:hover {
    background: #464646;
    border-color: #e5e5e5;
    color: #ffffff;
}

.vais-cc-btn:focus-visible,
.vais-cc-close:focus-visible,
.vais-cc summary:focus-visible,
.vais-cc a:focus-visible,
.vais-cc-switch:focus-visible {
    outline: 2px solid #f7b15e;
    outline-offset: 2px;
}

.vais-cc-close {
    position: absolute;
    top: -6px;
    right: -4px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #e5e5e5;
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
}

.vais-cc-close:hover {
    color: #ffffff;
}

/* Kategorien */

.vais-cc-cats {
    margin: 10px 0 12px;
}

.vais-cc-cat {
    padding: 10px 0;
    border-bottom: 1px solid #464646;
}

.vais-cc-cat:first-child {
    border-top: 1px solid #464646;
}

.vais-cc-cat-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vais-cc-cat-head label {
    margin: 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.vais-cc-always {
    margin-left: 6px;
    color: #bdbdbd;
    font-size: 13px;
    font-weight: 400;
}

.vais-cc-cat-text {
    margin: 4px 0 4px 56px;
    color: #cfcfcf;
    font-size: 14px;
}

/* Schalter: Checkbox als Kippschalter, bleibt per Tastatur bedienbar */
.vais-cc-switch {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    flex: 0 0 44px;
    width: 44px;
    height: 24px;
    margin: 0;
    border-radius: 12px;
    background: #5a5a5a;
    cursor: pointer;
    transition: background-color 0.15s ease-in;
}

.vais-cc-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: left 0.15s ease-in;
}

.vais-cc-switch:checked {
    background: #c29019;
}

.vais-cc-switch:checked::after {
    left: 23px;
}

.vais-cc-switch:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vais-cc-details {
    margin: 4px 0 0 56px;
    font-size: 14px;
}

.vais-cc-details summary {
    color: #f7b15e;
    cursor: pointer;
}

/* Tabellen (Banner und Cookie-Erklaerung) */

.vais-cc-table {
    width: 100%;
    margin: 8px 0 4px;
    border-collapse: collapse;
    color: inherit;
}

.vais-cc-table th,
.vais-cc-table td {
    padding: 7px 8px;
    border-bottom: 1px solid #464646;
    text-align: left;
    vertical-align: top;
}

.vais-cc-table th {
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.vais-cc-table td:first-child {
    overflow-wrap: anywhere;
}

.vais-cc-table-small {
    font-size: 13px;
}

/* Cookie-Erklaerung */

.vais-cc-declaration {
    margin: 10px 0 30px;
}

.vais-cc-declaration-title {
    margin: 28px 0 8px;
    font-size: 20px;
}

.vais-cc-table-wrap {
    overflow-x: auto;
}

.vais-cc-state {
    margin: 16px 0 10px;
    padding: 14px 16px 4px;
    border-left: 3px solid #c29019;
    background: #303030;
}

.vais-cc-state p {
    margin: 0 0 10px;
}

.vais-cc-state .vais-cc-btn {
    min-width: 0;
}

.vais-cc-hint {
    color: #bdbdbd;
    font-size: 14px;
}

/* Mobil: Buttons untereinander, Tabellen als Karten */

@media (max-width: 600px) {
    .vais-cc {
        font-size: 14px;
    }

    .vais-cc-inner {
        padding: 14px 12px 16px;
    }

    .vais-cc-btn {
        flex: 1 1 100%;
        min-width: 0;
    }

    .vais-cc-cat-text,
    .vais-cc-details {
        margin-left: 0;
    }

    .vais-cc-table thead {
        display: none;
    }

    .vais-cc-table,
    .vais-cc-table tbody,
    .vais-cc-table tr,
    .vais-cc-table td {
        display: block;
        width: 100%;
    }

    .vais-cc-table tr {
        padding: 6px 0;
        border-bottom: 1px solid #464646;
    }

    .vais-cc-table td {
        padding: 2px 0;
        border: 0;
    }

    .vais-cc-table td::before {
        content: attr(data-label) ': ';
        color: #ffffff;
        font-weight: 700;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vais-cc-btn,
    .vais-cc-switch,
    .vais-cc-switch::after {
        transition: none;
    }
}

@media print {
    .vais-cc {
        display: none !important;
    }
}
