/*
 * content-mode.css — Brener Cars / panel Consent Mode
 * Pelny zamiennik cookie-consent.css; zachowuje klasy .cc-*.
 * Zaladuj po glownych arkuszach strony. Logika zgody pozostaje w JavaScript.
 * Paleta: #020618, #1c0c04, #1f0e06, #F4F4F4, #FFFFFF.
 */

.cc-root {
    position: fixed;
    z-index: 99999;
    left: 0;
    right: 0;
    bottom: 0;
    font-family: inherit;
}

.cc-banner {
    background: #fff;
    border-top: 1px solid #e4e0dc;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
}

.cc-banner__wrapper {
    max-width: 1270px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.cc-banner__body h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #1c0c04;
}
.cc-banner__body p {
    margin: 0;
    color: #1f0e06;
}
.cc-banner__body a {
    color: #020618;
    font-weight: 600;
}

.cc-banner__btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

#cookie-consent-root .cc-btn {
    border: 1px solid #1c0c04;
    background: #fff;
    color: #1c0c04;
    border-radius: 24px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}
#cookie-consent-root .cc-btn:hover { background: #1c0c04; color: #fff; }

#cookie-consent-root .cc-btn--primary {
    background: #020618;
    border-color: #020618;
    color: #fff;
}
#cookie-consent-root .cc-btn--primary:hover {
    background: #1c0c04;
    border-color: #1c0c04;
}

#cookie-consent-root .cc-btn--outline { background: #fff; }
#cookie-consent-root .cc-btn--ghost { background: #F4F4F4; }

.cc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 99998;
}

.cc-modal {
    position: fixed;
    z-index: 99999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    max-width: 860px;
    max-height: 85vh;
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.cc-modal__header,
.cc-modal__footer {
    padding: 18px 22px;
    border-bottom: 1px solid #e4e0dc;
}
.cc-modal__footer {
    border-top: 1px solid #e4e0dc;
    border-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.cc-modal__content { padding: 18px 22px; }

.cc-modal__header h2 {
    margin: 0;
    font-size: 22px;
    color: #1c0c04;
}
.cc-close {
    position: absolute;
    right: 16px;
    top: 10px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.cc-intro { margin: 0 0 14px; color: #1f0e06; }

.cc-option {
    border: 1px solid #e4e0dc;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}
.cc-option h3 {
    margin: 0 0 6px;
    font-size: 17px;
}
.cc-option p {
    margin: 0;
    color: #555;
}
.cc-option--locked { background: #F4F4F4; }

.cc-switch { position: relative; flex: 0 0 48px; cursor: pointer; }
/* Ukrycie wizualne zachowuje obsluge klawiatura. */
.cc-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.cc-switch span {
    width: 48px;
    height: 28px;
    display: inline-block;
    border-radius: 20px;
    background: #d5d5d5;
    position: relative;
}
.cc-switch span:after {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    transition: all .2s ease;
}
#cookie-consent-root .cc-switch input:checked + span {
    background: #c62828;
}
.cc-switch input:checked + span:after {
    left: 23px;
}

@media (max-width: 767px) {
    .cc-banner__wrapper { flex-direction: column; align-items: flex-start; }
    .cc-banner__btns { width: 100%; flex-wrap: wrap; }
}

/* Dopasowanie do typografii i przyciskow Brener Cars. */
.cc-root,
.cc-modal {
    font-family: var(--default-font, "Inter Tight", sans-serif);
    font-size: 16px;
    line-height: 1.6;
    color: #1f0e06;
    color-scheme: light;
}

.cc-root *,
.cc-root *::before,
.cc-root *::after,
.cc-modal,
.cc-modal *,
.cc-modal *::before,
.cc-modal *::after {
    box-sizing: border-box;
}

.cc-banner {
    border-top: 3px solid #020618;
    max-height: 85vh;
    max-height: 85dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cc-banner__wrapper {
    max-width: 1400px;
    padding: 22px 24px;
    flex-wrap: wrap;
}

.cc-banner__body { flex: 1 1 420px; min-width: 0; }
.cc-banner__btns { flex-wrap: wrap; }

.cc-banner__body h2,
.cc-modal__header h2 {
    font-family: var(--heading-font, "Playfair Display", Georgia, serif);
    font-weight: 600;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: normal;
}

.cc-banner__body p,
.cc-intro,
.cc-option p {
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.cc-banner__body a,
.cc-modal a {
    color: #020618;
    font-weight: 600;
    /* Glowny arkusz wymusza brak podkreslenia na wszystkich linkach. */
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.cc-banner__body a:hover,
.cc-modal a:hover { color: #1c0c04; }

#cookie-consent-root .cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    max-width: 100%;
    padding: 11px 22px;
    border-color: #020618;
    border-radius: 50px;
    color: #020618;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

#cookie-consent-root .cc-btn:hover { background: #020618; color: #fff; }
#cookie-consent-root .cc-btn--primary { background: #020618; color: #fff; }
#cookie-consent-root .cc-btn--primary:hover { background: #1c0c04; border-color: #1c0c04; }

#cookie-consent-root .cc-btn:focus-visible,
.cc-close:focus-visible,
.cc-banner__body a:focus-visible,
.cc-modal a:focus-visible,
.cc-switch input:focus-visible + span {
    outline: 2px solid #020618;
    outline-offset: 4px;
}

.cc-modal {
    z-index: 100001;
    max-height: 85dvh;
    border: 1px solid #e4e0dc;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(2, 6, 24, .24);
    overscroll-behavior: contain;
}
.cc-modal-backdrop { z-index: 100000; background: rgba(2, 6, 24, .65); }
.cc-modal__header { padding-right: 68px; }
.cc-modal__footer { background: #F4F4F4; }

.cc-close {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    color: #020618;
    font-family: Arial, sans-serif;
}
.cc-close:hover { background: #F4F4F4; }

.cc-option { align-items: flex-start; border-radius: 14px; }
.cc-option > :first-child { min-width: 0; }
.cc-option h3 {
    /* custom.css ustawia globalne h3 na 28px !important. */
    font-size: 17px !important;
    font-family: var(--default-font, "Inter Tight", sans-serif);
    font-weight: 700;
    line-height: 1.4;
    color: #1c0c04;
}
.cc-option p { color: #555; }
.cc-switch { margin-top: 2px; }
.cc-switch span { vertical-align: middle; background: #767676; }
.cc-switch span::after { box-shadow: 0 1px 3px rgba(2, 6, 24, .2); }
.cc-switch input:checked + span::after { left: 23px; }
.cc-switch input:disabled + span { cursor: not-allowed; }

@media (max-width: 991px) {
    .cc-banner__wrapper { flex-direction: column; align-items: stretch; gap: 16px; }
    .cc-banner__body { flex: 0 1 auto; }
    .cc-banner__btns { width: 100%; }
    #cookie-consent-root .cc-banner__btns .cc-btn { flex: 1 1 180px; }
}

@media (max-width: 575px) {
    .cc-banner__wrapper { padding: 18px 16px; }
    .cc-banner__btns { gap: 8px; }
    #cookie-consent-root .cc-banner__btns .cc-btn,
    #cookie-consent-root .cc-modal__footer .cc-btn { flex: 1 1 100%; width: 100%; }
    .cc-modal { width: calc(100% - 24px); border-radius: 16px; }
    .cc-modal__header { padding: 18px 60px 18px 16px; }
    .cc-modal__content,
    .cc-modal__footer { padding: 16px; }
    .cc-modal__header h2 { font-size: 21px; }
    .cc-close { right: 8px; }
    .cc-option { padding: 12px; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    #cookie-consent-root .cc-btn,
    .cc-switch span::after { transition: none; }
}

/* Baner pozostaje nad przyciemnieniem strony; modal jest nad banerem. */
#cookie-consent-root .cc-banner {
    position: relative;
    z-index: 100001;
}
#cookie-consent-root .cc-modal { z-index: 100002; }
