/* Cookie consent component styles
   The client can safely change colors, font choices, spacing, and sizing here
   without changing the consent logic in `script.js`. */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand: #0465a0;
  --brand-strong: #035786;
  --text: #122334;
  --muted: #5d6b79;
  --surface: #ffffff;
  --surface-soft: #f2f7fb;
  --border: #d5e1ea;
  --overlay: rgba(7, 28, 45, 0.16);
  --shadow: 0 18px 40px rgba(17, 36, 53, 0.18);
  --radius: 14px;
}

body {
  min-height: 100vh;
  font-family: Verdana, Geneva, sans-serif;
  font-style: normal;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(4, 101, 160, 0.08), transparent 30%),
    linear-gradient(180deg, #f9fbfd 0%, #eef4f8 100%);
}

.cc-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(4, 101, 160, 0.12);
  color: var(--brand);
  flex: 0 0 auto;
}

.cc-cookie-icon {
  width: 15px;
  height: 15px;
}

[data-component="cookie-reopen"] {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(4, 101, 160, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

[data-component="cookie-reopen"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(4, 101, 160, 0.32);
}

[data-component="cookie-reopen"][hidden] {
  opacity: 0;
  pointer-events: none;
}

[data-component="cookie-reopen"] .cc-icon-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

[data-component="cookie-overlay"] {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  background: var(--overlay);
  opacity: 0;
  transition: opacity 0.2s ease;
}

[data-component="cookie-overlay"].is-open {
  display: block;
  opacity: 1;
}

[data-component="cookie-modal"] {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 9999;
  width: min(980px, calc(100vw - 28px));
  background: var(--surface);
  border: 1px solid rgba(213, 225, 234, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: translate(-50%, calc(-50% + 16px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

[data-component="cookie-modal"].is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.cc-header {
  padding: 20px 22px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.cc-close {
  display: none;
  border: 0;
  background: transparent;
  color: #8c97a3;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px 2px;
}

[data-component="cookie-modal"].is-details .cc-close {
  display: inline-flex;
}

.cc-brand .cc-icon-badge {
  width: 28px;
  height: 28px;
}

.cc-brand .cc-cookie-icon {
  width: 17px;
  height: 17px;
}

.cc-tabs {
  display: none;
  gap: 6px;
  padding: 0 22px 12px;
}

[data-component="cookie-modal"].is-details .cc-tabs {
  display: none;
}

.cc-tab {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cc-tab.is-active {
  color: var(--brand);
  border-color: rgba(4, 101, 160, 0.18);
  background: rgba(4, 101, 160, 0.06);
}

.cc-panels {
  padding: 0 22px;
}

.cc-panel {
  display: none;
}

.cc-panel.is-active {
  display: block;
}

#cc-panel-consent {
  padding: 0 0 6px;
}

#cc-desc {
  max-width: 900px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

[data-component="cookie-modal"].is-details .cc-panels {
  padding: 0 12px 10px;
}

[data-component="cookie-modal"].is-details .cc-panel {
  border-top: 1px solid #eef3f7;
  padding: 18px 10px 0;
}

#cc-panel-details h3,
#cc-panel-about h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

#cc-panel-details > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 14px;
}

#cc-panel-about p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.cc-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

[data-component="cookie-modal"].is-details .cc-cat {
  align-items: center;
  margin-top: 0;
  margin-bottom: 12px;
  padding: 14px 10px;
  border: 1px solid #e4eaf0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(17, 36, 53, 0.02);
}

.cc-cat h4 {
  margin-bottom: 6px;
  font-size: 15px;
}

[data-component="cookie-modal"].is-details .cc-cat h4 {
  font-size: 14px;
  font-weight: 700;
}

.cc-cat p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

[data-component="cookie-modal"].is-details .cc-cat p {
  font-size: 11px;
  line-height: 1.55;
}

.cc-switch {
  --w: 46px;
  --h: 28px;
  position: relative;
  width: var(--w);
  height: var(--h);
  flex: 0 0 var(--w);
  cursor: pointer;
}

.cc-switch input {
  display: none;
}

.cc-slider {
  position: absolute;
  inset: 0;
  border-radius: var(--h);
  background: #d6dbe1;
  transition: background 0.2s ease;
}

.cc-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(var(--h) - 6px);
  height: calc(var(--h) - 6px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-slider {
  background: #0465a0;
}

.cc-switch input:checked + .cc-slider::after {
  transform: translateX(calc(var(--w) - var(--h)));
}

.cc-switch input:disabled + .cc-slider {
  opacity: 1;
}

.cc-footer {
  display: flex;
  gap: 12px;
  padding: 12px 22px 18px;
}

[data-component="cookie-modal"].is-details .cc-footer {
  border-top: 1px solid #eef3f7;
  padding-top: 16px;
}

.cc-btn {
  flex: 1 1 0;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 400;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.cc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(18, 35, 52, 0.08);
}

.cc-btn-deny {
  border-color: var(--border);
  color: var(--text);
}

.cc-btn-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}

.cc-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.cc-btn-icon svg {
  width: 16px;
  height: 16px;
}

.cc-btn-all {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.cc-btn-all:hover {
  background: var(--brand-strong);
}

[data-component="cookie-modal"].is-details .cc-btn-icon {
  display: none;
}

@media (max-width: 720px) {
  [data-component="cookie-modal"] {
    width: calc(100vw - 20px);
  }

  .cc-header {
    padding: 18px 16px 10px;
  }

  .cc-brand {
    font-size: 16px;
  }

  .cc-tabs,
  .cc-panels {
    padding-left: 16px;
    padding-right: 16px;
  }

  [data-component="cookie-modal"].is-details .cc-panels {
    padding-left: 10px;
    padding-right: 10px;
  }

  .cc-footer {
    flex-direction: column;
    padding: 12px 16px 16px;
  }
}
