/*
 * Villa Verde – Consent Banner / Modal
 * Design nach dem bisherigen CookieHub-Banner: dunkles, zentriertes Modal,
 * gruene gleichwertige Buttons (#b4cc04), unterstrichene Links.
 */

.vv-consent {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.vv-consent.is-visible {
    opacity: 1;
}

.vv-consent[hidden] {
    display: none;
}

.vv-consent-box {
    position: relative;
    width: min(600px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    background: #3a3a3a;
    color: #f2f2f2;
    padding: 2.5rem 2.5rem 2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(12px);
    transition: transform 0.22s ease;
    font-family: inherit;
}

.vv-consent.is-visible .vv-consent-box {
    transform: translateY(0);
}

.vv-consent-title {
    margin: 0 0 1rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.vv-consent-body {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #d5d5d5;
}

.vv-consent-body strong {
    color: #fff;
    font-weight: 600;
}

.vv-consent-more {
    margin: 0 0 1.5rem;
}

.vv-consent-link {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: #e6e6e6;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.vv-consent-link:hover {
    color: #fff;
}

.vv-consent-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.vv-consent-btn {
    flex: 1 1 0;
    background: #b4cc04;
    color: #1a1a1a;
    border: 0;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background-color 0.18s ease, filter 0.18s ease;
}

.vv-consent-btn:hover,
.vv-consent-btn:focus-visible {
    filter: brightness(1.08);
    outline: none;
}

.vv-consent-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.vv-consent-settings-link {
    display: block;
    margin: 0 auto;
    background: none;
    border: 0;
    padding: 0.25rem;
    font: inherit;
    font-weight: 600;
    color: #e6e6e6;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.vv-consent-settings-link:hover {
    color: #fff;
}

/* --- Einstellungs-Modal ------------------------------------------------- */
.vv-consent-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: 0;
    color: #cfcfcf;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.vv-consent-close:hover {
    color: #fff;
}

.vv-consent-cat {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.vv-consent-cat-text {
    flex: 1 1 auto;
    min-width: 0;
}

.vv-consent-cat-text h3 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

.vv-consent-cat-text p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #c4c4c4;
}

.vv-consent-actions--settings {
    margin-top: 1.25rem;
    margin-bottom: 0;
}

/* --- Toggle-Switch ------------------------------------------------------ */
.vv-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    cursor: pointer;
    user-select: none;
    margin-top: 0.15rem;
}

.vv-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.vv-switch-track {
    position: relative;
    display: inline-block;
    width: 2.6rem;
    height: 1.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    transition: background-color 0.18s ease;
}

.vv-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.18s ease;
}

.vv-switch input:checked ~ .vv-switch-track {
    background: #b4cc04;
}

.vv-switch input:checked ~ .vv-switch-track .vv-switch-thumb {
    transform: translateX(1.15rem);
}

.vv-switch input:focus-visible ~ .vv-switch-track {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.vv-switch--locked {
    cursor: not-allowed;
}

.vv-switch--locked .vv-switch-track {
    opacity: 0.6;
}

/* --- Zahnrad: Cookie-Einstellungen erneut oeffnen (unten links) --------- */
.vv-consent-gear {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 19990;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #3a3a3a;
    color: #e6e6e6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    opacity: 0.82;
    transition: opacity 0.18s ease, transform 0.35s ease, color 0.18s ease;
}

.vv-consent-gear:hover,
.vv-consent-gear:focus-visible {
    opacity: 1;
    color: #b4cc04;
    transform: rotate(45deg);
    outline: none;
}

.vv-consent-gear:focus-visible {
    box-shadow: 0 0 0 3px rgba(180, 204, 4, 0.6);
}

/* Zahnrad ausblenden, solange ein Consent-Overlay (Banner/Modal) offen ist */
.vv-consent:not([hidden]) ~ .vv-consent-gear {
    opacity: 0;
    pointer-events: none;
}

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 560px) {
    .vv-consent-box {
        padding: 1.75rem 1.5rem 1.5rem;
    }

    .vv-consent-title {
        font-size: 1.35rem;
    }

    .vv-consent-actions {
        flex-direction: column;
    }

    .vv-consent-gear {
        width: 2.5rem;
        height: 2.5rem;
    }
}
