/* ==========================================================================
   Legal Pages & Cookie Consent
   ========================================================================== */

/* ---------- Legal Page Layout ---------- */
.legal-page {
  padding: 140px 0 80px;
  min-height: 100vh;
  background: var(--color-offwhite, #f5f5f7);
}

.legal-page h1 {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 42px;
  font-weight: 800;
  color: var(--color-black, #1d1d1f);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.legal-subtitle {
  font-size: 17px;
  color: var(--color-gray, #6e6e73);
  margin-bottom: 48px;
}

.legal-page h1 + h2 {
  margin-top: 48px;
}

.legal-page h2 {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-black, #1d1d1f);
  margin: 40px 0 12px;
}

.legal-page h3 {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-black, #1d1d1f);
  margin: 24px 0 8px;
}

.legal-page p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-gray, #6e6e73);
  margin-bottom: 16px;
}

.legal-page ul {
  margin: 8px 0 16px 20px;
  list-style: disc;
}

.legal-page li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-gray, #6e6e73);
  margin-bottom: 4px;
}

.legal-page a {
  color: var(--color-blue, #0071e3);
  text-decoration: underline;
  text-decoration-color: rgba(0, 113, 227, 0.3);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}

.legal-page a:hover {
  text-decoration-color: var(--color-blue, #0071e3);
}

.legal-date {
  margin-top: 48px;
  font-size: 13px;
  color: var(--color-gray-light, #86868b);
  font-style: italic;
}

.cookie-settings-section {
  margin-top: 48px;
  padding: 32px;
  background: #ffffff;
  border-radius: var(--radius, 18px);
  box-shadow: var(--shadow-sm, 0 2px 20px rgba(0, 0, 0, 0.05));
}

.cookie-settings-section h2 {
  margin-top: 0;
}

@media (max-width: 767px) {
  .legal-page {
    padding: 110px 0 60px;
  }
  .legal-page h1 {
    font-size: 28px;
  }
  .legal-page h2 {
    font-size: 19px;
  }
}

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 20px 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray, #6e6e73);
}

.cookie-banner-text a {
  color: var(--color-blue, #0071e3);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: 980px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.cookie-btn-accept {
  background: var(--color-blue, #0071e3);
  color: #fff;
}

.cookie-btn-accept:hover {
  background: #005bb5;
}

.cookie-btn-essential {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-black, #1d1d1f);
}

.cookie-btn-essential:hover {
  background: rgba(0, 0, 0, 0.1);
}

.cookie-btn-settings {
  background: transparent;
  color: var(--color-gray, #6e6e73);
  padding: 10px 12px;
  font-weight: 500;
}

.cookie-btn-settings:hover {
  color: var(--color-black, #1d1d1f);
}

/* ---------- Cookie Settings Modal ---------- */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.cookie-modal {
  background: #fff;
  border-radius: var(--radius-lg, 24px);
  max-width: 520px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 36px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.cookie-modal h3 {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-black, #1d1d1f);
  margin-bottom: 8px;
}

.cookie-modal > p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-gray, #6e6e73);
  margin-bottom: 24px;
}

.cookie-category {
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-category-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-black, #1d1d1f);
}

.cookie-category-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-gray-light, #86868b);
  margin-top: 6px;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 26px;
  transition: background 0.2s ease;
}

.cookie-toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  bottom: 3px;
  left: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
  background: var(--color-blue, #0071e3);
}

.cookie-toggle input:checked + .cookie-toggle-slider::before {
  transform: translateX(18px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  justify-content: flex-end;
}

/* Footer cookie link */
.cookie-settings-trigger {
  cursor: pointer;
}

@media (max-width: 767px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions {
    flex-direction: column;
  }
  .cookie-btn {
    text-align: center;
    padding: 12px 20px;
  }
  .cookie-modal {
    padding: 24px;
    border-radius: 18px;
  }
}
