/* Cookie Consent - Autoglas Profi */

:root {
    --cc-navy: #08194a;
    --cc-orange: #EB8C39;
    --cc-orange-dark: #d77a28;
    --cc-text: #2b2f3a;
    --cc-muted: #5f6675;
    --cc-border: #e3e6ec;
    --cc-bg-soft: #f5f6f9;
}

.cc-banner,
.cc-modal,
.cc-media {
    font-family: inherit;
    box-sizing: border-box;
}

.cc-banner *,
.cc-modal *,
.cc-media * {
    box-sizing: border-box;
}

.cc-hidden {
    display: none !important;
}

/* ---------- Banner ---------- */

.cc-banner {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 760px;
    background: #ffffff;
    color: var(--cc-text);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(8, 25, 74, 0.25);
    padding: 22px 24px;
    z-index: 1000010;
    animation: cc-slide-up 0.35s ease-out;
}

@keyframes cc-slide-up {
    from { opacity: 0; transform: translate(-50%, 20px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

.cc-banner__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--cc-navy);
    line-height: 1.3;
}

.cc-banner__title svg {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
}

.cc-banner__text {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cc-muted);
}

.cc-banner__text a,
.cc-modal a {
    color: var(--cc-orange-dark);
    text-decoration: underline;
}

.cc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* ---------- Buttons ---------- */

.cc-btn {
    appearance: none;
    border: 2px solid var(--cc-navy);
    background: #ffffff;
    color: var(--cc-navy);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    padding: 11px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    min-width: 160px;
}

.cc-btn:hover {
    background: var(--cc-navy);
    color: #ffffff;
}

.cc-btn--primary {
    background: var(--cc-orange);
    border-color: var(--cc-orange);
    color: #ffffff;
}

.cc-btn--primary:hover {
    background: var(--cc-orange-dark);
    border-color: var(--cc-orange-dark);
}

.cc-btn:focus-visible,
.cc-link:focus-visible,
.cc-switch input:focus-visible + .cc-switch__track {
    outline: 3px solid var(--cc-orange);
    outline-offset: 2px;
}

.cc-link {
    appearance: none;
    background: none;
    border: 0;
    padding: 6px 4px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--cc-navy);
    text-decoration: underline;
    cursor: pointer;
}

.cc-link:hover {
    color: var(--cc-orange-dark);
}

/* ---------- Modal ---------- */

.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 25, 74, 0.55);
}

.cc-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: var(--cc-text);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.cc-modal__header {
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--cc-border);
}

.cc-modal__header h2 {
    margin: 0 36px 6px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--cc-navy);
    line-height: 1.3;
}

.cc-modal__header p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--cc-muted);
}

.cc-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--cc-bg-soft);
    color: var(--cc-navy);
    font-size: 22px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
}

.cc-modal__close:hover {
    background: var(--cc-border);
}

.cc-modal__body {
    padding: 8px 24px;
    overflow-y: auto;
}

.cc-modal__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--cc-border);
}

.cc-modal__footer .cc-btn {
    flex: 1 1 160px;
}

.cc-modal__legal {
    width: 100%;
    margin: 4px 0 0;
    font-size: 12px;
    text-align: center;
    color: var(--cc-muted);
}

/* ---------- Categories ---------- */

.cc-cat {
    padding: 16px 0;
    border-bottom: 1px solid var(--cc-border);
}

.cc-cat:last-child {
    border-bottom: 0;
}

.cc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cc-cat__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--cc-navy);
}

.cc-cat__desc {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--cc-muted);
}

.cc-cat details {
    margin-top: 8px;
    font-size: 13px;
}

.cc-cat summary {
    cursor: pointer;
    color: var(--cc-navy);
    font-weight: 600;
}

.cc-cat table {
    width: 100%;
    margin-top: 8px;
    border-collapse: collapse;
    font-size: 12px;
}

.cc-cat th,
.cc-cat td {
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
    border: 1px solid var(--cc-border);
}

.cc-cat th {
    background: var(--cc-bg-soft);
    color: var(--cc-navy);
    font-weight: 600;
}

.cc-badge {
    font-size: 12px;
    font-weight: 700;
    color: #2e7d32;
    white-space: nowrap;
}

/* Toggle switch */
.cc-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.cc-switch__track {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 13px;
    background: #c5cad4;
    transition: background 0.2s;
}

.cc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s;
}

.cc-switch input:checked + .cc-switch__track {
    background: var(--cc-orange);
}

.cc-switch input:checked + .cc-switch__track::after {
    transform: translateX(20px);
}

/* ---------- Blocked external media (Google Maps) ---------- */

.cc-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 320px;
    padding: 30px 20px;
    background: var(--cc-bg-soft);
    text-align: center;
}

.cc-media__inner {
    max-width: 460px;
}

.cc-media__inner svg {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
}

.cc-media__inner h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--cc-navy);
}

.cc-media__inner p {
    margin: 0 0 16px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--cc-muted);
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
    .cc-banner {
        bottom: 12px;
        padding: 18px 16px;
    }

    .cc-banner__title {
        font-size: 16px;
    }

    .cc-banner__text {
        font-size: 13px;
    }

    .cc-actions .cc-btn {
        flex: 1 1 100%;
    }

    .cc-actions .cc-link {
        margin: 0 auto;
    }

    .cc-modal {
        padding: 0;
        align-items: flex-end;
    }

    .cc-modal__dialog {
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }

    .cc-modal__header,
    .cc-modal__body,
    .cc-modal__footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media print {
    .cc-banner,
    .cc-modal {
        display: none !important;
    }
}
