/*
 * cookie-consent.css — OPTIFIT Perform
 * GDPR cookie consent banner. Follows the site design system.
 */

.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cc-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

/* ---- Views ---- */
.cc-view {
  padding: 28px 24px 24px;
}

/* ---- Close button ---- */
.cc-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-3);
  padding: 6px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}
.cc-close:hover { color: var(--ink); }

/* ---- Typography ---- */
.cc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
  margin: 0 0 12px;
  padding-right: 32px;
  line-height: 1.2;
}
.cc-desc {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 22px;
}
.cc-desc a { color: var(--brand-orange); text-decoration: underline; }

/* ---- Button row ---- */
.cc-buttons {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.cc-buttons-top { padding-top: 20px; border-top: 1px solid var(--line); }

.cc-btn {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13px;
  padding: 11px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1.5px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  flex: 1;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-align: center;
  line-height: 1.2;
}
.cc-btn:hover { border-color: var(--ink); }

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

/* ---- Categories (customize view) ---- */
.cc-categories {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.cc-category {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cc-category:last-child { border-bottom: none; }

.cc-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.cc-category-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.cc-category-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.cc-always-active {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-orange);
  background: var(--brand-orange-tint);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.cc-category-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0;
}

/* ---- Toggle switch ---- */
.cc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.cc-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cc-toggle-track {
  display: block;
  width: 44px;
  height: 26px;
  background: var(--line-strong);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
}
.cc-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.cc-toggle-input:checked + .cc-toggle-track { background: var(--brand-orange); }
.cc-toggle-input:checked + .cc-toggle-track::after { transform: translateX(18px); }

/* Always-on (necessary) toggle — visually on, not interactive */
.cc-toggle-fixed .cc-toggle-track {
  background: var(--brand-orange);
  cursor: not-allowed;
}
.cc-toggle-fixed .cc-toggle-track::after { transform: translateX(18px); }
