/* ═══════════════════════════════════════════════════════════
   MECHANIKPRO – COOKIE CONSENT (motyw ciemny)
   Zgodny z paletą serwisu: czerń, czerwień rgb(234,0,4),
   Inter / Barlow Condensed
   ═══════════════════════════════════════════════════════════ */

.cc-root {
  --cc-bg:      #0d0d0d;
  --cc-bg-soft: #161616;
  --cc-text:    #ffffff;
  --cc-muted:   rgba(255, 255, 255, 0.45);
  --cc-soft:    rgba(255, 255, 255, 0.72);
  --cc-border:  rgba(255, 255, 255, 0.12);
  --cc-accent:  rgb(234, 0, 4);
  --cc-accent-dim: rgba(234, 0, 4, 0.12);
  --cc-font:    var(--font-main, 'Inter', sans-serif);
  --cc-font-cond: var(--font-cond, 'Barlow Condensed', sans-serif);
}

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

/* ─── BANER ──────────────────────────────────────────────── */
.cc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9400;
  padding: 18px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.cc-banner__inner {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 1080px;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
  padding: 26px 30px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(.25,.46,.45,.94), opacity 0.3s ease;
}

/* Czerwony pasek akcentu */
.cc-banner__inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cc-accent);
  border-radius: 4px 4px 0 0;
}

.cc-root.is-ready .cc-banner__inner {
  transform: translateY(0);
  opacity: 1;
}

.cc-eyebrow {
  font-family: var(--cc-font-cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cc-accent);
  margin-bottom: 10px;
}

.cc-banner__text {
  font-family: var(--cc-font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--cc-soft);
  max-width: 62ch;
}
.cc-banner__text a {
  color: var(--cc-accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cc-banner__text a:hover { color: #ff2a2e; }

.cc-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
}

/* ─── PRZYCISKI ──────────────────────────────────────────── */
.cc-btn {
  font-family: var(--cc-font);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  text-align: center;
  white-space: nowrap;
  background: none;
}

.cc-btn--primary {
  background: var(--cc-accent);
  color: #fff;
  border-color: var(--cc-accent);
}
.cc-btn--primary:hover { background: #c40003; border-color: #c40003; }

/* Równorzędny wizualnie z „Akceptuję" – wymóg RODO */
.cc-btn--secondary {
  background: transparent;
  color: var(--cc-text);
  border-color: rgba(255, 255, 255, 0.35);
}
.cc-btn--secondary:hover {
  border-color: var(--cc-text);
  background: rgba(255, 255, 255, 0.07);
}

.cc-btn--link {
  background: none;
  border: none;
  padding: 6px 0;
  color: var(--cc-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cc-btn--link:hover { color: var(--cc-text); }

.cc-btn:focus-visible,
.cc-toggle input:focus-visible + .cc-toggle__track {
  outline: 2px solid var(--cc-accent);
  outline-offset: 3px;
}

/* ─── PANEL USTAWIEŃ ─────────────────────────────────────── */
.cc-panel {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cc-panel.is-open { opacity: 1; pointer-events: all; }

.cc-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cc-panel__box {
  position: relative;
  z-index: 1;
  background: var(--cc-bg);
  border: 1px solid var(--cc-border);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.8);
  transform: translateY(28px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(.25,.46,.45,.94), opacity 0.3s ease;
}
.cc-panel__box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--cc-accent);
  border-radius: 4px 4px 0 0;
}
.cc-panel.is-open .cc-panel__box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cc-panel__head {
  padding: 32px 36px 22px;
  border-bottom: 1px solid var(--cc-border);
}
.cc-panel__title {
  font-family: var(--cc-font-cond);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--cc-text);
}
.cc-panel__intro {
  font-family: var(--cc-font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--cc-soft);
  margin-top: 12px;
}

.cc-panel__close {
  position: absolute;
  top: 22px; right: 22px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--cc-border);
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  color: var(--cc-muted);
  transition: all 0.25s ease;
}
.cc-panel__close:hover {
  background: var(--cc-accent);
  border-color: var(--cc-accent);
  color: #fff;
}
.cc-panel__close svg { width: 15px; height: 15px; }

.cc-panel__body {
  padding: 6px 36px 20px;
  overflow-y: auto;
}

/* ─── KATEGORIE ──────────────────────────────────────────── */
.cc-cat {
  padding: 22px 0;
  border-bottom: 1px solid var(--cc-border);
}
.cc-cat:last-child { border-bottom: none; }

.cc-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cc-cat__name {
  font-family: var(--cc-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--cc-text);
}
.cc-cat__desc {
  font-family: var(--cc-font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--cc-soft);
  margin-top: 8px;
  max-width: 52ch;
}
.cc-cat__meta {
  font-family: var(--cc-font);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--cc-muted);
  margin-top: 8px;
}

.cc-cat__locked {
  font-family: var(--cc-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cc-accent);
  background: var(--cc-accent-dim);
  border: 1px solid rgba(234, 0, 4, 0.3);
  padding: 6px 11px;
  border-radius: 3px;
  white-space: nowrap;
}

/* ─── PRZEŁĄCZNIK ────────────────────────────────────────── */
.cc-toggle {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-flex;
}
.cc-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.cc-toggle__track {
  width: 50px; height: 28px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  transition: background 0.25s ease;
  display: block;
  position: relative;
}
.cc-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s cubic-bezier(.25,.46,.45,.94);
}
.cc-toggle input:checked + .cc-toggle__track { background: var(--cc-accent); }
.cc-toggle input:checked + .cc-toggle__track::after { transform: translateX(22px); }

/* ─── STOPKA PANELU ──────────────────────────────────────── */
.cc-panel__foot {
  padding: 20px 36px 26px;
  border-top: 1px solid var(--cc-border);
  background: var(--cc-bg-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.cc-panel__foot .cc-btn { flex: 0 0 auto; }

/* ─── ZABLOKOWANE RAMKI (mapa, wideo) ────────────────────── */
[data-cc-embed] {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
}
.cc-embed__ph {
  width: 100%;
  height: 100%;
  min-height: 260px;
  background: var(--cc-bg-soft);
  border: 1px dashed var(--cc-border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 28px;
  text-align: center;
}
.cc-embed__text {
  font-family: var(--cc-font);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cc-soft);
  max-width: 44ch;
  margin: 0;
}
.cc-embed__text strong { color: var(--cc-text); font-weight: 600; }
.cc-embed__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* ─── RESPONSYWNOŚĆ ──────────────────────────────────────── */
@media (max-width: 860px) {
  .cc-banner { padding: 12px; }
  .cc-banner__inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px 20px;
  }
  .cc-banner__actions { min-width: 0; }
  .cc-panel__head { padding: 26px 22px 18px; }
  .cc-panel__body { padding: 4px 22px 18px; }
  .cc-panel__foot { padding: 16px 22px 22px; }
  .cc-panel__foot .cc-btn { flex: 1 1 100%; }
  .cc-panel__title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner__inner,
  .cc-panel,
  .cc-panel__box,
  .cc-toggle__track,
  .cc-toggle__track::after { transition: none !important; }
}
