/* ==========================================================
   Consent Mode v2 – baner cookies (edytaolech.pl)
   Samodzielny, bez zależności. Dopasowany do stylu strony.
   ========================================================== */
:root {
  --scm-primary: #008B8B;
  --scm-primary-hover: #007676;
  --scm-accent: #40E0D0;
  --scm-text: #0f172a;
  --scm-muted: #475569;
  --scm-border: #e2e8f0;
  --scm-bg: #ffffff;
}

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

/* ---- Baner (dolny) ---- */
.scm-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2147483000;
  max-width: 480px;
  margin: 0 auto 0 0;
  background: var(--scm-bg);
  color: var(--scm-text);
  border: 1px solid var(--scm-border);
  border-radius: 1rem;
  box-shadow: 0 20px 50px -12px rgba(0, 0, 0, .35);
  padding: 1.5rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .9rem;
  line-height: 1.55;
}
.scm-banner h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .5rem;
  color: var(--scm-text);
}
.scm-banner p { margin: 0 0 1rem; color: var(--scm-muted); }
.scm-banner a { color: var(--scm-primary); text-decoration: underline; }

/* ---- Przyciski ---- */
.scm-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.scm-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: .6rem 1.15rem;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  flex: 1 1 auto;
  white-space: nowrap;
}
.scm-btn-primary { background: var(--scm-primary); color: #fff; }
.scm-btn-primary:hover { background: var(--scm-primary-hover); }
.scm-btn-secondary { background: transparent; color: var(--scm-text); border-color: var(--scm-border); }
.scm-btn-secondary:hover { border-color: var(--scm-primary); color: var(--scm-primary); }
.scm-btn-link {
  background: none; border: none; color: var(--scm-muted);
  text-decoration: underline; cursor: pointer; font: inherit; padding: .6rem .4rem;
}
.scm-btn-link:hover { color: var(--scm-primary); }

/* ---- Modal ustawień ---- */
.scm-modal-overlay {
  position: fixed; inset: 0;
  z-index: 2147483001;
  background: rgba(15, 23, 42, .6);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  font-family: 'Inter', system-ui, sans-serif;
}
.scm-modal {
  background: var(--scm-bg);
  color: var(--scm-text);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.scm-modal-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--scm-border);
}
.scm-modal-header h2 { margin: 0 0 .35rem; font-size: 1.2rem; font-weight: 600; }
.scm-modal-header p { margin: 0; color: var(--scm-muted); font-size: .9rem; }
.scm-modal-body { padding: .5rem 1.75rem; overflow-y: auto; }

/* ---- Wiersz kategorii ---- */
.scm-cat {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem 0; border-bottom: 1px solid var(--scm-border);
}
.scm-cat:last-child { border-bottom: none; }
.scm-cat-text { flex: 1; }
.scm-cat-text h3 { margin: 0 0 .2rem; font-size: .95rem; font-weight: 600; }
.scm-cat-text p { margin: 0; font-size: .82rem; color: var(--scm-muted); line-height: 1.45; }

/* ---- Przełącznik (switch) ---- */
.scm-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; margin-top: .15rem; }
.scm-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.scm-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: #cbd5e1; border-radius: 9999px; transition: .25s;
}
.scm-slider::before {
  content: ""; position: absolute; height: 18px; width: 18px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s;
}
.scm-switch input:checked + .scm-slider { background: var(--scm-primary); }
.scm-switch input:checked + .scm-slider::before { transform: translateX(20px); }
.scm-switch input:disabled + .scm-slider { background: var(--scm-accent); cursor: not-allowed; opacity: .7; }

.scm-modal-footer {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--scm-border);
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end;
}

/* ---- Responsywność ---- */
@media (max-width: 520px) {
  .scm-banner { max-width: none; left: .75rem; right: .75rem; bottom: .75rem; padding: 1.25rem; }
  .scm-actions .scm-btn { flex: 1 1 100%; }
  .scm-modal-footer .scm-btn { flex: 1 1 100%; }
}
