/* WorkerService – zgoda na cookies */
:root {
    --ws-cc-navy: #40475f;
    --ws-cc-navy-dark: #2f3446;
    --ws-cc-gold: #ad8e6c;
    --ws-cc-text: #2b2b2b;
    --ws-cc-muted: #5f6370;
    --ws-cc-line: #e3e4e8;
    --ws-cc-bg: #ffffff;
    --ws-cc-soft: #f4f5f8;
}

.ws-cc-banner, .ws-cc-modal, .ws-embed { font-family: 'Montserrat', Arial, sans-serif; color: var(--ws-cc-text); }
.ws-cc-banner *, .ws-cc-modal *, .ws-embed * { box-sizing: border-box; }
.ws-cc-banner[hidden], .ws-cc-modal[hidden] { display: none !important; }
html.ws-cc-lock, html.ws-cc-lock body { overflow: hidden; }

/* ---------- baner (warstwa 1, nie blokuje strony) ---------- */
.ws-cc-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99998;
    display: flex; justify-content: center; pointer-events: none;
}
.ws-cc-banner__inner {
    pointer-events: auto; width: 100%; max-width: 980px;
    background: var(--ws-cc-bg); border-top: 4px solid var(--ws-cc-gold);
    border-radius: 6px; box-shadow: 0 10px 40px rgba(20, 24, 38, .28);
    padding: 24px 28px; max-height: calc(100vh - 32px); overflow-y: auto;
}
.ws-cc-title { margin: 0 0 10px; font-size: 18px; line-height: 1.3; font-weight: 700; color: var(--ws-cc-navy); }
.ws-cc-text { margin: 0 0 18px; font-size: 13.5px; line-height: 1.6; color: var(--ws-cc-muted); }
.ws-cc-text a, .ws-cc-cat__desc a { color: var(--ws-cc-navy); text-decoration: underline; font-weight: 600; }

/* ---------- przyciski (Odrzuć i Akceptuj – identyczna waga wizualna) ---------- */
.ws-cc-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ws-cc-btn {
    appearance: none; border: 2px solid var(--ws-cc-navy); border-radius: 4px; cursor: pointer;
    font: 600 14px/1.2 'Montserrat', Arial, sans-serif; padding: 12px 22px; min-height: 46px;
    transition: background-color .2s, color .2s, border-color .2s; text-align: center;
}
.ws-cc-btn--primary { background: var(--ws-cc-navy); color: #fff; }
.ws-cc-btn--primary:hover { background: var(--ws-cc-navy-dark); border-color: var(--ws-cc-navy-dark); }
.ws-cc-btn--ghost { background: #fff; color: var(--ws-cc-navy); }
.ws-cc-btn--ghost:hover { background: var(--ws-cc-soft); }
.ws-cc-btn:focus-visible, .ws-cc-close:focus-visible, .ws-cc-switch input:focus-visible + .ws-cc-switch__track,
.ws-cc-details summary:focus-visible, #footer_copyright .cookies_settings:focus-visible {
    outline: 3px solid var(--ws-cc-gold); outline-offset: 2px;
}

/* ---------- okno ustawień (warstwa 2) ---------- */
.ws-cc-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ws-cc-modal__backdrop { position: absolute; inset: 0; background: rgba(20, 24, 38, .6); }
.ws-cc-modal__dialog {
    position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 32px);
    display: flex; flex-direction: column; background: var(--ws-cc-bg);
    border-top: 4px solid var(--ws-cc-gold); border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.ws-cc-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px 12px; }
.ws-cc-modal__head .ws-cc-title { margin: 0; font-size: 20px; }
.ws-cc-close {
    appearance: none; background: none; border: 0; cursor: pointer; font-size: 30px; line-height: 1;
    color: var(--ws-cc-muted); padding: 4px 8px; border-radius: 4px;
}
.ws-cc-close:hover { color: var(--ws-cc-navy); background: var(--ws-cc-soft); }
.ws-cc-modal__body { padding: 0 28px 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ws-cc-modal__foot { padding: 16px 28px 20px; border-top: 1px solid var(--ws-cc-line); }

.ws-cc-cat { border-top: 1px solid var(--ws-cc-line); padding: 16px 0; }
.ws-cc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ws-cc-cat__name { font-size: 15px; font-weight: 700; color: var(--ws-cc-navy); cursor: pointer; }
span.ws-cc-cat__name { cursor: default; }
.ws-cc-cat__desc { margin: 8px 0 6px; font-size: 13px; line-height: 1.55; color: var(--ws-cc-muted); }
.ws-cc-always { font-size: 12.5px; font-weight: 700; color: var(--ws-cc-gold); white-space: nowrap; }

.ws-cc-details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ws-cc-navy); padding: 4px 0; display: inline-block; }
.ws-cc-table-wrap { overflow-x: auto; margin-top: 8px; }
.ws-cc-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.45; }
.ws-cc-table th, .ws-cc-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--ws-cc-line); vertical-align: top; }
.ws-cc-table th { background: var(--ws-cc-soft); color: var(--ws-cc-navy); font-weight: 700; white-space: nowrap; }
.ws-cc-meta { margin: 8px 0 12px; font-size: 11.5px; color: var(--ws-cc-muted); word-break: break-all; }
.ws-cc-meta:empty { display: none; }

/* przełącznik */
.ws-cc-switch { position: relative; display: inline-flex; flex-shrink: 0; width: 48px; height: 26px; cursor: pointer; }
.ws-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.ws-cc-switch__track { position: absolute; inset: 0; border-radius: 26px; background: #c4c7cf; transition: background-color .2s; }
.ws-cc-switch__track::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s;
}
.ws-cc-switch input:checked + .ws-cc-switch__track { background: var(--ws-cc-navy); }
.ws-cc-switch input:checked + .ws-cc-switch__track::after { transform: translateX(22px); }
.ws-cc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* link w stopce (teraz <button>) */
#footer_copyright .cookies_settings { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- zablokowane osadzenia (np. Mapy Google) ---------- */
.ws-embed { position: relative; display: block; width: 100%; min-height: 260px; background: var(--ws-cc-soft); }
.ws-embed > iframe { display: block; width: 100%; visibility: hidden; }
.ws-embed--active > iframe { visibility: visible; }
.ws-embed__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center; }
.ws-embed--active .ws-embed__placeholder { display: none; }
.ws-embed__box { max-width: 460px; }
.ws-embed__box p { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: var(--ws-cc-muted); }
.ws-embed__link { display: block; margin-top: 10px; font-size: 12.5px; color: var(--ws-cc-navy); text-decoration: underline; }

@media (max-width: 640px) {
    .ws-cc-banner { left: 8px; right: 8px; bottom: 8px; }
    .ws-cc-banner__inner { padding: 18px 16px; }
    .ws-cc-title { font-size: 16px; }
    .ws-cc-text { font-size: 12.5px; margin-bottom: 14px; }
    .ws-cc-actions { flex-direction: column; }
    .ws-cc-actions .ws-cc-btn { width: 100%; }
    .ws-cc-modal { padding: 0; align-items: stretch; }
    .ws-cc-modal__dialog { max-height: 100vh; height: 100%; border-radius: 0; }
    .ws-cc-modal__head, .ws-cc-modal__body, .ws-cc-modal__foot { padding-left: 16px; padding-right: 16px; }
}

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