/* ═══════════════════════════════════════════════════════════════
   EURION.SE — cookie-consent.css
   GDPR cookie consent banner — Scandinavian minimalist style
   ═══════════════════════════════════════════════════════════════ */

/* ── Banner container ────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.38s ease;
  will-change: transform, opacity;
}

.cookie-banner--visible {
  transform: translateY(0);
  opacity: 1;
}

/* ── Simple (one-line) view ──────────────────────────────────── */
.cookie-banner__simple {
  background: rgba(7, 16, 31, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 24px;
}

.cookie-banner__inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  min-width: 260px;
}

.cookie-banner__title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.cookie-banner__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.60);
  line-height: 1.55;
}

.cookie-banner__desc a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.cookie-banner__desc a:hover {
  color: #fff;
}

/* ── Actions ─────────────────────────────────────────────────── */
.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Cookie buttons ──────────────────────────────────────────── */
.cookie-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  line-height: 1;
}

/* Accept All — blue, solid */
.cookie-btn--primary {
  background: #1a54f0;
  color: #fff;
  border-color: #1a54f0;
}
.cookie-btn--primary:hover {
  background: #3569f5;
  border-color: #3569f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 84, 240, 0.4);
}
.cookie-btn--primary:active {
  transform: translateY(0) scale(0.97);
}

/* Reject All — outlined, equal visual weight */
.cookie-btn--secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}
.cookie-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

/* Customize — text style */
.cookie-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.50);
  border-color: transparent;
  padding-left: 4px;
  padding-right: 4px;
}
.cookie-btn--ghost:hover {
  color: rgba(255, 255, 255, 0.80);
}

/* Back button in panel */
.cookie-btn--back {
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border-color: transparent;
  padding: 6px 10px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cookie-btn--back:hover {
  color: rgba(255, 255, 255, 0.85);
}
.cookie-btn--back svg {
  width: 14px;
  height: 14px;
}

/* ── Customize panel ─────────────────────────────────────────── */
.cookie-banner__panel {
  background: rgba(7, 16, 31, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 28px 24px 24px;
}

.cookie-banner__panel-inner {
  max-width: 680px;
  margin: 0 auto;
}

.cookie-banner__panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.cookie-banner__panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

/* ── Cookie categories ───────────────────────────────────────── */
.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cookie-category:last-of-type {
  border-bottom: none;
}

.cookie-category__info {
  flex: 1;
}

.cookie-category__info strong,
.cookie-category__info label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.90);
  margin-bottom: 4px;
  cursor: default;
}

.cookie-category__info label {
  cursor: pointer;
}

.cookie-category__info p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.5;
  max-width: 480px;
}

/* ── Toggle switch ───────────────────────────────────────────── */
.cookie-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-toggle__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cookie-toggle__track {
  width: 42px;
  height: 23px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.2s ease;
}

.cookie-toggle__input:checked + .cookie-toggle__track {
  background: #1a54f0;
  border-color: #1a54f0;
}

.cookie-toggle__input:checked + .cookie-toggle__track::after {
  transform: translateX(19px);
  background: #fff;
}

.cookie-toggle__input:focus-visible + .cookie-toggle__track {
  outline: 2px solid #3569f5;
  outline-offset: 2px;
}

/* Always-on (essential) toggle */
.cookie-toggle--locked {
  cursor: not-allowed;
  pointer-events: none;
}

.cookie-toggle--on {
  background: #1a54f0 !important;
  border-color: #1a54f0 !important;
  opacity: 0.55;
}

.cookie-toggle--on::after {
  transform: translateX(19px);
  background: #fff;
}

/* ── Panel actions row ───────────────────────────────────────── */
.cookie-banner__panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Policy link below panel ─────────────────────────────────── */
.cookie-banner__policy-note {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.30);
}

.cookie-banner__policy-note a {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

.cookie-banner__policy-note a:hover {
  color: rgba(255, 255, 255, 0.70);
}

/* ── "Cookie settings" link in footer ───────────────────────── */
.cookie-settings-link {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s ease;
}

.cookie-settings-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .cookie-banner__panel-actions {
    justify-content: stretch;
  }

  .cookie-banner__panel-actions .cookie-btn {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .cookie-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner__actions .cookie-btn {
    text-align: center;
  }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner {
    transition: none;
  }
  .cookie-toggle__track,
  .cookie-toggle__track::after {
    transition: none;
  }
}
