/* ==========================================================================
   Cookie consent - styled for djinox.pl (design tokens: assets/css/variables.css).
   Part 1 lives inside the Shadow DOM banner/dialog (consently.js loads this file into it).
   Part 2 styles the page-level placeholders that stand in for blocked embeds.
   Custom properties (--font-heading, --color-*) inherit through the shadow boundary.
   ========================================================================== */

/* ---------- Part 1: banner + settings dialog (always dark, like the site's nav/footer) ---------- */
:host { all: initial; position: relative; z-index: 2147483000; }
:host *, :host *::before, :host *::after { box-sizing: border-box; }
:host [hidden] { display: none !important; }

:host .cly-ui {
  --cly-bg: #111114; --cly-text: #f5f5f7; --cly-muted: #a8a8b0; --cly-border: rgba(255,255,255,.12);
  --cly-soft: rgba(255,255,255,.06); --cly-accent: #6d5bf0; --cly-accent-hover: #5a49dd;
  font: 14px/1.55 var(--font-body, 'Inter', 'Helvetica Neue', Arial, sans-serif); color: var(--cly-text);
}

:host h2 { margin: 0 0 8px; font: 700 20px/1.25 var(--font-heading, 'Sora', 'Helvetica Neue', Arial, sans-serif); letter-spacing: -.01em; color: var(--cly-text); }
:host p { margin: 0; color: var(--cly-muted); font-size: 14px; line-height: 1.6; }
:host a { color: var(--cly-text); text-decoration: underline; text-underline-offset: 3px; }
:host a:hover { color: #fff; }
:host button { font-family: inherit; cursor: pointer; }
:host button:focus-visible, :host a:focus-visible, :host input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* small uppercase label with the accent dot - same device as the site's section kickers */
:host .cly-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cly-muted); }
:host .cly-kicker::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cly-accent); }

/* banner */
:host .cly-banner { position: fixed; z-index: 2; inset: auto 24px 24px; max-width: 1180px; margin: auto; display: flex; align-items: center; gap: 32px; padding: 26px 28px; background: var(--cly-bg); border: 1px solid var(--cly-border); border-radius: 12px; box-shadow: 0 24px 56px rgba(0,0,0,.6); animation: cly-in .3s cubic-bezier(.2,.8,.2,1) both; overflow: hidden; }
:host .cly-banner::before { content: ""; position: absolute; top: 0; left: 28px; width: 56px; height: 3px; border-radius: 0 0 3px 3px; background: var(--cly-accent); }
:host .cly-copy { flex: 1; min-width: 0; }
:host .cly-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12px; }
:host .cly-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex: 0 0 360px; }
:host .cly-actions .cly-outline { grid-column: 1 / -1; }

/* buttons: reject and accept are deliberately identical in size, colour and weight */
:host .cly-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 14px; border: 1px solid var(--cly-border); border-radius: 6px; background: var(--cly-soft); color: var(--cly-text); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 1.3; transition: background .15s, border-color .15s; }
:host .cly-choice { background: var(--cly-accent); border-color: var(--cly-accent); color: #fff; }
:host .cly-choice:hover { background: var(--cly-accent-hover); border-color: var(--cly-accent-hover); }
:host .cly-outline { background: transparent; border-color: rgba(255,255,255,.28); }
:host .cly-outline:hover { border-color: #fff; }

/* corner variants (config 'position') */
:host .cly-bottom-left .cly-banner, :host .cly-bottom-right .cly-banner { max-width: 460px; display: block; margin: 0; }
:host .cly-bottom-left .cly-banner { right: auto; }
:host .cly-bottom-right .cly-banner { left: auto; }
:host .cly-bottom-left .cly-actions, :host .cly-bottom-right .cly-actions { margin-top: 18px; }

/* floating pill that re-opens the settings once a choice was made */
:host .cly-trigger { position: fixed; left: 18px; bottom: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--cly-bg); color: var(--cly-text); border: 1px solid var(--cly-border); border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
:host .cly-trigger::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cly-accent); }
:host .cly-trigger:hover { border-color: rgba(255,255,255,.4); }
:host .cly-bottom-left .cly-trigger { left: auto; right: 18px; }

/* settings dialog */
:host .cly-overlay { position: fixed; inset: 0; z-index: 3; display: flex; justify-content: center; align-items: center; padding: 24px; background: rgba(5,5,8,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); overscroll-behavior: contain; }
:host .cly-dialog { position: relative; width: min(620px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 30px 28px 26px; background: var(--cly-bg); border: 1px solid var(--cly-border); border-radius: 12px; box-shadow: 0 24px 56px rgba(0,0,0,.6); animation: cly-in .25s cubic-bezier(.2,.8,.2,1) both; }
:host .cly-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
:host .cly-close { width: 36px; height: 36px; padding: 0; border: 1px solid var(--cly-border); border-radius: 6px; background: transparent; color: var(--cly-text); font-size: 24px; line-height: 1; }
:host .cly-close:hover { border-color: #fff; }
:host .cly-intro { margin: 6px 0 20px; }
:host .cly-category { display: flex; justify-content: space-between; align-items: center; gap: 22px; padding: 16px 0; border-top: 1px solid var(--cly-border); cursor: pointer; }
:host .cly-category strong { font: 600 14px/1.3 var(--font-heading, 'Sora', Arial, sans-serif); color: var(--cly-text); }
:host .cly-category p { margin-top: 4px; font-size: 13px; }
:host .cly-toggle { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 44px; width: 44px; height: 25px; margin: 0; background: rgba(255,255,255,.22); border: 1px solid transparent; border-radius: 99px; cursor: pointer; transition: background .15s; }
:host .cly-toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .15s; }
:host .cly-toggle:checked { background: var(--cly-accent); }
:host .cly-toggle:checked::after { transform: translateX(19px); }
:host .cly-toggle:disabled { opacity: .55; cursor: default; }
:host .cly-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
:host .cly-modal-actions > :last-child { grid-column: 1 / -1; }
:host .cly-modal-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 18px; font-size: 12px; }
:host .cly-text-button { padding: 4px 0; border: 0; background: none; color: var(--cly-text); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
:host .cly-consent-id { margin-top: 14px; font-size: 11px; word-break: break-all; color: var(--cly-muted); }
:host .cly-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@keyframes cly-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (max-width: 800px) {
  :host .cly-banner { display: block; inset: auto 8px 8px; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 22px 18px 18px; }
  :host .cly-banner::before { left: 18px; }
  :host .cly-actions { margin-top: 16px; }
  :host .cly-bottom-left .cly-banner, :host .cly-bottom-right .cly-banner { left: 8px; right: 8px; max-width: unset; }
  :host .cly-overlay { padding: 8px; align-items: flex-end; }
  :host .cly-dialog { padding: 24px 18px 20px; max-height: calc(100dvh - 16px); }
  :host .cly-trigger { left: 10px; bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) { :host * { transition: none !important; animation: none !important; } }

/* ---------- Part 2: page-level pieces (placeholders for blocked embeds, cookie table) ---------- */
iframe[data-consently-src], iframe[data-consently-category] { display: none !important; }
img[data-consently-src][data-consently-category] { display: none !important; }
.video-card, .release-detail__video, .podcast-player__frame { position: relative; }

.consently-placeholder { box-sizing: border-box; min-height: 180px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; background: var(--color-surface-alt, #f6f6f8); border: 1px solid var(--color-border, #e7e7ea); border-radius: var(--radius-md, 12px); color: var(--color-text, #0e0e10); font: 14px/1.5 var(--font-body, 'Inter', Arial, sans-serif); }
.consently-placeholder strong { font: 600 15px/1.3 var(--font-heading, 'Sora', Arial, sans-serif); }
.consently-placeholder p { max-width: 46ch; margin: 0; font-size: 13px; color: var(--color-text-muted, #6b6b73); }
.consently-placeholder button { padding: 10px 18px; background: transparent; color: var(--color-text, #0e0e10); border: 1px solid var(--color-border, #e7e7ea); border-radius: var(--radius-sm, 6px); font: 600 12px/1.3 var(--font-body, 'Inter', Arial, sans-serif); letter-spacing: .02em; text-transform: uppercase; cursor: pointer; box-shadow: none; }
.consently-placeholder button:hover { border-color: var(--color-text, #0e0e10); }
.consently-placeholder-fill { position: absolute; inset: 0; min-height: 0; overflow: auto; }

/* small 16:9 video tiles: the title is already printed under the tile */
.video-card .consently-placeholder { padding: 10px; gap: 8px; }
.video-card .consently-placeholder strong { display: none; }
.video-card .consently-placeholder p { font-size: 12px; }
.video-card .consently-placeholder button { padding: 6px 10px; font-size: 11px; }

.consently-table-wrap { overflow-x: auto; margin-top: 16px; }
.consently-declaration table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.consently-declaration th { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-muted, #6b6b73); }
.consently-declaration th, .consently-declaration td { padding: 12px; border-bottom: 1px solid var(--color-border, #e7e7ea); vertical-align: top; }
