/* ═══════════════════════════════════════════════════════════════
   TEMRA VITA — legal.css
   Centered, Fully-Responsive Styles for Legal Pages & Cookie Manager
   ═══════════════════════════════════════════════════════════════ */

/* ─── RESET BOX-SIZING WITHIN LEGAL SCOPE ─── */
.legal-hero,
.legal-main-section,
.cookie-banner-wrapper,
.cookie-modal-overlay {
  box-sizing: border-box;
}

.legal-hero *,
.legal-main-section *,
.cookie-banner-wrapper *,
.cookie-modal-overlay * {
  box-sizing: border-box;
}

/* ─── LEGAL HERO / HEADER (CENTERED) ─── */
.legal-hero {
  padding-top: calc(var(--nav-height) + 50px);
  padding-bottom: 50px;
  background: radial-gradient(circle at 50% 20%, rgba(25, 211, 197, 0.08), transparent 70%), var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  text-align: center;
}

body.light-mode .legal-hero {
  background: radial-gradient(circle at 50% 20%, rgba(0, 175, 154, 0.07), transparent 70%), var(--bg-light);
  border-bottom: 1px solid rgba(15, 31, 29, 0.08);
}

.legal-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted-dark);
  margin: 0 auto 1.5rem;
  text-align: center;
}

.legal-breadcrumbs a {
  color: var(--teal-primary);
  transition: opacity var(--transition-base);
}

.legal-breadcrumbs a:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.legal-breadcrumbs span.sep {
  opacity: 0.4;
}

.legal-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  margin: 0 auto 2rem;
  max-width: 860px;
}

.legal-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal-primary);
  text-align: center;
}

.legal-title {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text-light);
  text-align: center;
  margin: 0 auto;
}

.legal-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted-dark);
  max-width: 740px;
  line-height: 1.6;
  text-align: center;
  margin: 0 auto;
}

/* ─── META BAR & LANGUAGE SWITCHER (CENTERED) ─── */
.legal-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  background: var(--bg-dark-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

body.light-mode .legal-controls-bar {
  background: #ffffff;
  border-color: rgba(15, 31, 29, 0.08);
  box-shadow: 0 4px 20px rgba(15, 31, 29, 0.04);
}

.legal-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted-dark);
}

.legal-badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-badge-item strong {
  color: var(--text-light);
  font-weight: 500;
}

.legal-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-primary);
  display: inline-block;
  box-shadow: 0 0 8px var(--teal-primary);
}

/* Language Switcher Tabs */
.legal-lang-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.35rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.light-mode .legal-lang-switcher {
  background: rgba(15, 31, 29, 0.05);
  border-color: rgba(15, 31, 29, 0.08);
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted-dark);
  cursor: pointer;
  transition: all var(--transition-base);
}

.lang-btn:hover {
  color: var(--text-light);
}

.lang-btn.active {
  background: var(--teal-primary);
  color: #06100f;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(25, 211, 197, 0.3);
}

/* ─── MAIN CENTERED CONTAINER ─── */
.legal-main-section {
  padding: 50px 0 100px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.legal-centered-wrapper {
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

/* Document Switcher Bar (Centered at Top) */
.legal-nav-hub {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  text-align: center;
  align-items: center;
}

.legal-doc-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  background: var(--bg-dark-2);
  padding: 0.5rem;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 100%;
}

body.light-mode .legal-doc-pills {
  background: #ffffff;
  border-color: rgba(15, 31, 29, 0.08);
  box-shadow: 0 4px 20px rgba(15, 31, 29, 0.04);
}

.legal-doc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted-dark);
  border-radius: 30px;
  transition: all var(--transition-base);
  text-decoration: none;
}

.legal-doc-pill:hover {
  color: var(--teal-primary);
  background: rgba(25, 211, 197, 0.06);
}

.legal-doc-pill.current {
  background: var(--teal-primary);
  color: #06100f;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(25, 211, 197, 0.3);
}

/* Quick TOC Navigation Drawer / Pills (Centered) */
.legal-toc-accordion {
  width: 100%;
  background: var(--bg-dark-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  text-align: left;
}

body.light-mode .legal-toc-accordion {
  background: #ffffff;
  border-color: rgba(15, 31, 29, 0.08);
  box-shadow: 0 4px 20px rgba(15, 31, 29, 0.04);
}

.legal-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.legal-toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-toc-toggle-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-base);
  color: var(--text-muted-dark);
}

.legal-toc-accordion.open .legal-toc-toggle-icon {
  transform: rotate(180deg);
}

.toc-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-mode .toc-nav-grid {
  border-top-color: rgba(15, 31, 29, 0.07);
}

.toc-link {
  font-size: 0.82rem;
  color: var(--text-muted-dark);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid transparent;
}

.toc-link:hover {
  color: var(--teal-primary);
  background: rgba(25, 211, 197, 0.06);
}

.toc-link.active {
  color: var(--teal-primary);
  background: rgba(25, 211, 197, 0.1);
  border-left-color: var(--teal-primary);
  font-weight: 500;
}

/* ─── LEGAL ARTICLE CONTENT ─── */
.legal-content-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  max-width: 100%;
}

.legal-section-block {
  background: var(--bg-dark-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
  scroll-margin-top: calc(var(--nav-height) + 24px);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

body.light-mode .legal-section-block {
  background: #ffffff;
  border-color: rgba(15, 31, 29, 0.08);
  box-shadow: 0 4px 24px rgba(15, 31, 29, 0.03);
}

.legal-section-block:hover {
  border-color: rgba(25, 211, 197, 0.25);
}

.legal-sec-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

body.light-mode .legal-sec-header {
  border-bottom-color: rgba(15, 31, 29, 0.07);
}

.legal-sec-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--teal-primary);
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

.legal-sec-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-light);
  line-height: 1.25;
}

.legal-text-content {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted-dark);
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

body.light-mode .legal-text-content {
  color: rgba(15, 31, 29, 0.85);
}

.legal-text-content p {
  margin-bottom: 1rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.legal-text-content p:last-child {
  margin-bottom: 0;
}

.legal-text-content strong {
  color: var(--text-light);
  font-weight: 600;
}

.legal-text-content ul,
.legal-text-content ol {
  margin: 1rem 0;
  padding-left: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.legal-text-content ul {
  list-style: none;
}

.legal-text-content ul li {
  position: relative;
  padding-left: 1.35rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.legal-text-content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-primary);
}

.legal-text-content a {
  color: var(--teal-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition-base);
  overflow-wrap: break-word;
  word-break: break-all;
}

.legal-text-content a:hover {
  opacity: 0.85;
}

/* Callout box inside legal content */
.legal-callout {
  background: rgba(25, 211, 197, 0.06);
  border-left: 3px solid var(--teal-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  box-sizing: border-box;
}

body.light-mode .legal-callout {
  background: rgba(0, 175, 154, 0.06);
  border-left-color: var(--teal-dark);
}

.legal-callout p {
  margin-bottom: 0.4rem;
}
.legal-callout p:last-child {
  margin-bottom: 0;
}

/* Sub-heading inside section */
.legal-sub-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-light);
  margin: 1.5rem 0 0.5rem;
  font-family: var(--font-body);
}

/* ─── TABLES (NO HORIZONTAL OVERFLOW OF PAGE) ─── */
.table-scroll-hint {
  font-size: 0.78rem;
  color: var(--teal-primary);
  margin-bottom: 0.5rem;
  text-align: right;
  display: none;
}

@media (max-width: 768px) {
  .table-scroll-hint {
    display: block;
  }
}

.legal-table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: var(--bg-dark-3);
  box-sizing: border-box;
  display: block;
}

body.light-mode .legal-table-responsive {
  background: #fcfcfb;
  border-color: rgba(15, 31, 29, 0.1);
}

.legal-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.legal-table th {
  background: rgba(25, 211, 197, 0.1);
  color: var(--text-light);
  font-weight: 600;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
}

body.light-mode .legal-table th {
  background: rgba(0, 175, 154, 0.08);
  color: var(--text-dark);
  border-bottom-color: rgba(15, 31, 29, 0.1);
}

.legal-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted-dark);
  vertical-align: top;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
}

body.light-mode .legal-table td {
  border-bottom-color: rgba(15, 31, 29, 0.06);
  color: var(--text-dark);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

.legal-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

body.light-mode .legal-table tr:hover td {
  background: rgba(15, 31, 29, 0.02);
}

.badge-exempt {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.badge-consent {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(25, 211, 197, 0.15);
  color: var(--teal-primary);
  font-weight: 500;
}

/* ─── INTERACTIVE BUTTONS IN LEGAL PAGES ─── */
.btn-legal-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--teal-primary);
  color: #06100f;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  margin-top: 0.75rem;
  font-family: var(--font-body);
}

.btn-legal-action:hover {
  background: #3ce5d9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 211, 197, 0.3);
}

/* ─── LANGUAGE VISIBILITY TOGGLE ─── */
.lang-content-block {
  display: none;
  width: 100%;
}

.lang-content-block.active {
  display: block;
}

/* ─── COOKIE CONSENT BANNER (CENTERED) ─── */
.cookie-banner-wrapper {
  position: fixed;
  bottom: 24px;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 32px) !important;
  max-width: 660px !important;
  margin: 0 !important;
  z-index: 99999;
  pointer-events: none;
  box-sizing: border-box;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.cookie-banner-wrapper.hidden {
  opacity: 0;
  transform: translate(-50%, 30px) !important;
  pointer-events: none;
}

.cookie-banner {
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
  background: rgba(12, 26, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(25, 211, 197, 0.28);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(25, 211, 197, 0.12);
  color: var(--text-light);
  text-align: center;
}

body.light-mode .cookie-banner {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 175, 154, 0.3);
  box-shadow: 0 20px 50px rgba(15, 31, 29, 0.18);
  color: var(--text-dark);
}

.cookie-banner-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  text-align: center;
}

.cookie-banner-icon {
  width: 20px;
  height: 20px;
  color: var(--teal-primary);
  flex-shrink: 0;
}

.cookie-banner-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-light);
}

body.light-mode .cookie-banner-title {
  color: var(--text-dark);
}

.cookie-banner-text {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text-muted-dark);
  margin: 0 auto 1.25rem;
  max-width: 580px;
  text-align: center;
}

body.light-mode .cookie-banner-text {
  color: rgba(15, 31, 29, 0.75);
}

.cookie-banner-text a {
  color: var(--teal-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 auto;
}

.btn-cookie {
  padding: 0.6rem 1.3rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 30px;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: var(--font-body);
}

.btn-cookie-accept {
  background: var(--teal-primary);
  color: #06100f;
  border: 1px solid var(--teal-primary);
  font-weight: 600;
}

.btn-cookie-accept:hover {
  background: #3ce5d9;
  box-shadow: 0 4px 15px rgba(25, 211, 197, 0.35);
}

.btn-cookie-reject {
  background: transparent;
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body.light-mode .btn-cookie-reject {
  color: var(--text-dark);
  border-color: rgba(15, 31, 29, 0.25);
}

.btn-cookie-reject:hover {
  border-color: var(--teal-primary);
  color: var(--teal-primary);
}

.btn-cookie-settings {
  background: transparent;
  color: var(--text-muted-dark);
  border: none;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.6rem 0.8rem;
  margin-left: 0;
}

.btn-cookie-settings:hover {
  color: var(--teal-primary);
}

/* ─── COOKIE PREFERENCES MODAL (CENTERED) ─── */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

.cookie-modal {
  background: var(--bg-dark-2);
  border: 1px solid rgba(25, 211, 197, 0.25);
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  transform: translateY(20px);
  transition: transform var(--transition-base);
  box-sizing: border-box;
  margin: auto;
}

body.light-mode .cookie-modal {
  background: #ffffff;
  border-color: rgba(0, 175, 154, 0.2);
  box-shadow: 0 25px 60px rgba(15, 31, 29, 0.15);
}

.cookie-modal-overlay.open .cookie-modal {
  transform: translateY(0);
}

.cookie-modal-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.light-mode .cookie-modal-header {
  border-bottom-color: rgba(15, 31, 29, 0.08);
}

.cookie-modal-title {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--text-light);
}

body.light-mode .cookie-modal-title {
  color: var(--text-dark);
}

.cookie-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted-dark);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
}

.cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
}

body.light-mode .cookie-modal-close:hover {
  background: rgba(15, 31, 29, 0.08);
  color: var(--text-dark);
}

.cookie-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cookie-modal-body::-webkit-scrollbar {
  width: 5px;
}
.cookie-modal-body::-webkit-scrollbar-thumb {
  background: rgba(25, 211, 197, 0.2);
  border-radius: 5px;
}

.cookie-intro-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted-dark);
}

/* Category item inside modal */
.cookie-category {
  background: var(--bg-dark-3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  transition: border-color var(--transition-base);
}

body.light-mode .cookie-category {
  background: #f8faf9;
  border-color: rgba(15, 31, 29, 0.07);
}

.cookie-cat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cookie-cat-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-light);
}

body.light-mode .cookie-cat-title {
  color: var(--text-dark);
}

.cookie-cat-status {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--teal-primary);
  background: rgba(25, 211, 197, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
}

.cookie-cat-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted-dark);
}

/* Custom Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: var(--transition-base);
  border-radius: 24px;
}

body.light-mode .slider {
  background-color: rgba(15, 31, 29, 0.2);
}

.slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition-base);
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--teal-primary);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--teal-primary);
}

input:checked + .slider::before {
  transform: translateX(20px);
}

input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Modal Footer (Centered) */
.cookie-modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.light-mode .cookie-modal-footer {
  border-top-color: rgba(15, 31, 29, 0.08);
}

/* ─── FOOTER COOKIE SETTINGS BUTTON ─── */
.footer-cookie-settings-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.78rem;
  color: rgba(240, 245, 244, 0.35);
  cursor: pointer;
  transition: color var(--transition-base);
}

.footer-cookie-settings-btn:hover {
  color: var(--teal-primary);
}

body.light-mode .footer-cookie-settings-btn {
  color: rgba(15, 31, 29, 0.5);
}

body.light-mode .footer-cookie-settings-btn:hover {
  color: var(--teal-primary);
}

/* ─── CONTACT FORM PRIVACY NOTICE ─── */
.form-privacy-notice {
  font-size: 0.78rem;
  color: var(--text-muted-dark);
  line-height: 1.5;
  margin-top: 0.75rem;
  text-align: center;
}

body.light-mode .form-privacy-notice {
  color: rgba(15, 31, 29, 0.65);
}

.form-privacy-notice a {
  color: var(--teal-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─── RESPONSIVE RULES (PHONE & TABLET) ─── */
@media (max-width: 768px) {
  .legal-hero {
    padding-top: calc(var(--nav-height) + 30px);
    padding-bottom: 35px;
  }

  .legal-section-block {
    padding: 1.5rem 1.25rem;
  }

  .legal-controls-bar {
    padding: 1rem;
    gap: 1rem;
  }

  .cookie-banner-wrapper {
    width: calc(100% - 24px) !important;
    bottom: 16px;
  }

  .cookie-banner {
    padding: 1.25rem 1.15rem;
  }

  .cookie-banner-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-cookie {
    width: 100%;
    text-align: center;
  }

  .cookie-modal {
    max-height: 92vh;
  }

  .cookie-modal-header,
  .cookie-modal-body,
  .cookie-modal-footer {
    padding: 1.25rem 1rem;
  }

  .cookie-modal-footer {
    flex-direction: column;
    width: 100%;
  }

  .cookie-modal-footer .btn-cookie {
    width: 100%;
  }

  .toc-nav-grid {
    grid-template-columns: 1fr;
  }
}
