/* ═══════════════════════════════════════════════════════════════
   COOKIE-SETTINGS.CSS — Cookie Settings page
   Builds on styles.css variables and legal.css hero
═══════════════════════════════════════════════════════════════ */

.cs-page { background: var(--bg-light); }

/* ── Hero link ─────────────────────────────────────────────── */
.cs-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  margin-top: 12px;
  transition: color 0.15s;
}
.cs-hero-link:hover { color: rgba(255, 255, 255, 0.75); }

/* ── Main layout ────────────────────────────────────────────── */
.cs-main {
  padding: 72px 24px 80px;
}

.cs-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Info notice ────────────────────────────────────────────── */
.cs-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.14);
  border-radius: 14px;
  padding: 18px 22px;
}
.cs-notice-icon {
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
}
.cs-notice p {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.65;
}

/* ── Categories card ────────────────────────────────────────── */
.cs-categories {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.05);
}

.cs-category {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.cs-category:last-child { border-bottom: none; }
.cs-category:hover { background: #fafbfc; }
.cs-category.cs-active { background: rgba(16, 185, 129, 0.025); }

/* Category icons */
.cs-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.cs-ic-essential { background: rgba(16, 185, 129, 0.10); color: var(--green); }
.cs-ic-analytics  { background: rgba(59, 130, 246, 0.10); color: #3b82f6; }
.cs-ic-perf       { background: rgba(245, 158, 11, 0.10); color: #d97706; }
.cs-ic-marketing  { background: rgba(168, 85, 247, 0.10); color: #9333ea; }

/* Category body */
.cs-cat-body {
  flex: 1;
  min-width: 0;
}

.cs-cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}

.cs-cat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-h);
  letter-spacing: -0.015em;
}

.cs-always-on {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #15803d;
  background: rgba(187, 247, 208, 0.55);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 100px;
  padding: 3px 9px 3px 7px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cs-cat-desc {
  font-size: 13.5px;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 10px;
}

/* Expand button */
.cs-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--green);
  padding: 0;
  letter-spacing: -0.01em;
  transition: opacity 0.15s;
  outline: none;
}
.cs-expand-btn:hover { opacity: 0.7; }
.cs-expand-btn .cs-expand-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.cs-expand-btn[aria-expanded="true"] .cs-expand-arrow { transform: rotate(180deg); }

/* Detail panel */
.cs-detail {
  margin-top: 14px;
  padding: 18px 20px;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--border);
  animation: cs-slide-in 0.18s ease;
}
@keyframes cs-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cs-detail p {
  font-size: 13px;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 8px;
}
.cs-detail p:last-child { margin-bottom: 0; }
.cs-detail strong { color: var(--text-h); font-weight: 600; }
.cs-detail ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cs-detail li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-light);
  line-height: 1.55;
}
.cs-detail li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  opacity: 0.6;
  flex-shrink: 0;
  margin-top: 6px;
}

/* Category right (toggle) */
.cs-cat-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── Toggle ─────────────────────────────────────────────────── */
.cs-toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
  display: block;
}
.cs-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.cs-track {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 100px;
  transition: background 0.22s, box-shadow 0.22s;
}
.cs-toggle input:checked  ~ .cs-track { background: var(--green); }
.cs-toggle input:disabled ~ .cs-track { background: #6ee7b7; cursor: not-allowed; }
.cs-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18), 0 1px 2px rgba(0,0,0,0.08);
  transition: transform 0.24s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.cs-toggle input:checked  ~ .cs-track::after { transform: translateX(22px); }
.cs-toggle:focus-within .cs-track { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25); }

/* ── Action Bar ─────────────────────────────────────────────── */
.cs-actionbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.07), 0 -1px 4px rgba(0, 0, 0, 0.04);
  padding: 16px 24px 20px;
}

.cs-actionbar-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cs-actionbar-status {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--green);
  flex: 1;
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}
.cs-actionbar-status.cs-status-show {
  opacity: 1;
  transform: translateY(0);
}

.cs-actionbar-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.cs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.16s ease;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: -0.01em;
}
.cs-btn:active { transform: scale(0.975); }
.cs-btn:focus-visible { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3); }

.cs-btn-reject {
  background: transparent;
  color: var(--text-body);
  border: 1.5px solid var(--border);
}
.cs-btn-reject:hover { border-color: #9ca3af; background: var(--bg-light); color: var(--text-h); }

.cs-btn-save {
  background: var(--bg-light);
  color: var(--text-h);
  border: 1.5px solid var(--border);
}
.cs-btn-save:hover { background: #f1f5f9; border-color: #94a3b8; }

.cs-btn-accept {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.24), 0 6px 20px rgba(16, 185, 129, 0.16);
}
.cs-btn-accept:hover {
  background: #0ea571;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), 0 8px 28px rgba(16, 185, 129, 0.2);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .cs-main { padding: 48px 16px 80px; }
  .cs-category { padding: 22px 20px; gap: 14px; }
  .cs-cat-icon { width: 38px; height: 38px; border-radius: 10px; }
  .cs-cat-title { font-size: 14px; }
  .cs-cat-desc { font-size: 13px; }
  .cs-actionbar { padding: 14px 16px 24px; }
  .cs-actionbar-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cs-actionbar-status { justify-content: center; }
  .cs-actionbar-btns { flex-direction: column; gap: 8px; }
  .cs-btn { width: 100%; padding: 15px 22px; font-size: 14.5px; }
}

@media (max-width: 400px) {
  .cs-cat-icon { display: none; }
}
