/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: var(--violet-dark);
  color: #e6e0f2;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
}

.cookie-banner[hidden] { display: none; }

.cookie-banner__inner {
  max-width: var(--content);
  margin-inline: auto;
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.cookie-banner__inner p { margin: 0; flex: 1 1 320px; color: #e6e0f2; font-size: 0.92rem; }
.cookie-banner__inner a { color: var(--gold); font-weight: 600; }

.cookie-banner__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---------- Cookie preferences modal ---------- */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 18, 56, 0.55);
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.cookie-modal-overlay[hidden] { display: none; }

.cookie-modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-5);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}

.cookie-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.cookie-modal__head h2 { margin: 0; }

.cookie-category {
  border-top: 1px solid var(--border);
  padding-block: var(--space-3);
}

.cookie-category__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.cookie-category__head h3 { margin: 0; }
.cookie-category p { margin: var(--space-1) 0 0; font-size: 0.9rem; }

.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; }

.switch input {
  position: absolute;
  opacity: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  cursor: pointer;
}

.switch__track {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--border);
  display: inline-block;
  position: relative;
  transition: background-color .15s ease;
}

.switch__track::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  transition: transform .15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.switch input:checked + .switch__track { background: var(--violet); }
.switch input:checked + .switch__track::before { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--violet); outline-offset: 2px; }

html.has-modal-open { overflow: hidden; }

/* ---------- Footer settings link ---------- */
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.footer-link-btn {
  padding: 0;
  color: #cfc6e3;
  text-decoration: underline;
  font-size: 0.85rem;
}

.footer-link-btn:hover { color: var(--white); }

/* ---------- Jump to top ---------- */
.jump-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 120;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(32, 18, 56, 0.35);
  transition: transform .12s ease, opacity .12s ease;
}

.jump-top[hidden] { display: none; }
.jump-top:hover { transform: translateY(-2px); }

@media (max-width: 640px) {
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { flex: 1 1 auto; }
}
