/* Sefas Cookie Consent */
:root {
  --cc-primary: #EF5214;
  --cc-primary-hover: #d4440d;
  --cc-text: #212529;
  --cc-muted: #5f6770;
  --cc-bg: #ffffff;
  --cc-surface: #f6f7f9;
  --cc-border: #e3e6ea;
  --cc-radius: 16px;
  --cc-shadow: 0 20px 50px rgba(17, 24, 39, .18), 0 2px 8px rgba(17, 24, 39, .08);
}

/* ---------- Banner ---------- */
.cc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1050;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 24px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border: 1px solid var(--cc-border);
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  color: var(--cc-text);
  display: flex;
  align-items: center;
  gap: 20px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .3s ease, transform .3s ease;
}
.cc-banner.is-visible { opacity: 1; transform: none; }

.cc-banner__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(239, 82, 20, .1);
  color: var(--cc-primary);
}
.cc-banner__icon svg { width: 26px; height: 26px; }

.cc-banner__body { flex: 1 1 auto; min-width: 0; }
.cc-banner__title { margin: 0 0 4px; font-size: 1rem; font-weight: 700; color: var(--cc-text); }
.cc-banner__text { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--cc-muted); }
.cc-banner__text a { color: var(--cc-primary); text-decoration: underline; }

.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }

/* ---------- Buttons ---------- */
.cc-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.cc-btn:focus-visible { outline: 3px solid rgba(239, 82, 20, .4); outline-offset: 2px; }
.cc-btn--primary { background: var(--cc-primary); color: #fff; }
.cc-btn--primary:hover { background: var(--cc-primary-hover); }
.cc-btn--outline { background: transparent; color: var(--cc-text); border-color: #c9ced4; }
.cc-btn--outline:hover { border-color: var(--cc-text); }
.cc-btn--ghost { background: transparent; color: var(--cc-primary); padding-inline: 10px; }
.cc-btn--ghost:hover { text-decoration: underline; }

/* ---------- Preferences dialog ---------- */
.cc-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  color: var(--cc-text);
  background: var(--cc-bg);
  overflow: hidden;
}
.cc-dialog[open] { display: flex; flex-direction: column; animation: cc-pop .25s ease; }
.cc-dialog::backdrop { background: rgba(17, 24, 39, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

.cc-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cc-border);
}
.cc-dialog__header h2 { margin: 0; font-size: 1.125rem; font-weight: 700; }
.cc-close {
  appearance: none;
  border: 0;
  background: var(--cc-surface);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: var(--cc-text);
}
.cc-close:hover { background: var(--cc-border); }

.cc-dialog__body { padding: 16px 24px; overflow-y: auto; }
.cc-dialog__intro { font-size: .875rem; line-height: 1.55; color: var(--cc-muted); margin: 0 0 16px; }
.cc-dialog__intro a { color: var(--cc-primary); text-decoration: underline; }

.cc-gpc {
  font-size: .8125rem;
  padding: 10px 12px;
  margin: 0 0 16px;
  border-radius: 10px;
  background: rgba(239, 82, 20, .08);
  color: var(--cc-text);
}

.cc-category {
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--cc-surface);
}
.cc-category__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cc-category__title { margin: 0; font-size: .9375rem; font-weight: 700; }
.cc-category__desc { margin: 6px 0 0; font-size: .8125rem; line-height: 1.5; color: var(--cc-muted); }
.cc-badge { font-size: .75rem; font-weight: 600; color: var(--cc-muted); white-space: nowrap; }

/* Toggle switch */
.cc-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.cc-switch input { position: absolute; inset: 0; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch__track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #c9ced4;
  position: relative;
  pointer-events: none;
  transition: background-color .2s ease;
}
.cc-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.cc-switch input:checked + .cc-switch__track { background: var(--cc-primary); }
.cc-switch input:checked + .cc-switch__track::after { transform: translateX(20px); }
.cc-switch input:focus-visible + .cc-switch__track { outline: 3px solid rgba(239, 82, 20, .4); outline-offset: 2px; }

.cc-dialog__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--cc-border);
}

/* Footer links */
.cc-footer-links { margin-top: 4px; }
.cc-footer-links a,
.cc-footer-links button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.cc-footer-links .cc-sep { margin: 0 8px; opacity: .6; }

/* ---------- Cookie policy page ---------- */
.cookie-policy { line-height: 1.7; }
.cookie-policy h2 { font-size: 1.375rem; margin: 2rem 0 .75rem; }
.cookie-policy h3 { font-size: 1.125rem; margin: 1.5rem 0 .5rem; }
.cookie-policy .cookie-policy__meta { color: var(--cc-muted); font-size: .875rem; }
.cookie-policy .cookie-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--cc-border); border-radius: 12px; }
.cookie-policy table { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 560px; }
.cookie-policy th,
.cookie-policy td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--cc-border); color: var(--cc-text); background: var(--cc-bg); }
.cookie-policy th { background: var(--cc-surface); font-weight: 700; }
.cookie-policy tr:last-child td { border-bottom: 0; }
.cookie-policy code { background: var(--cc-surface); padding: 1px 6px; border-radius: 4px; font-size: .8125rem; color: var(--cc-text); }

@keyframes cc-pop {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .cc-banner { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px; left: 12px; right: 12px; }
  .cc-banner__icon { display: none; }
  .cc-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .cc-actions .cc-btn--ghost { grid-column: 1 / -1; order: 3; }
  .cc-btn { white-space: normal; }
  .cc-dialog__footer { display: grid; grid-template-columns: 1fr 1fr; }
  .cc-dialog__footer .cc-btn--primary { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner, .cc-switch__track, .cc-switch__track::after { transition: none; }
  .cc-dialog[open] { animation: none; }
}
