/* ============================================
   MERIDIAN OCEANICS — COOKIE CONSENT
   Rides on the palette in styles.css. --dark, --platinum, --card-bg and
   --glass-border are already flipped by body.light-mode, so most of this is
   theme-agnostic; only the few hard-coded values need a light override.
   Lime (--neon) is never used as text — it is unreadable on the light theme.
   ============================================ */

.mo-cc {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 4000;
  width: min(680px, calc(100vw - 2rem));
  transform: translate(-50%, calc(100% + 2rem));
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              visibility 0s linear 0.5s;
}

.mo-cc.is-on {
  transform: translate(-50%, -1.25rem);
  opacity: 1;
  visibility: visible;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease,
              visibility 0s;
}

.mo-cc-card {
  background: rgba(8, 22, 51, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

body.light-mode .mo-cc-card {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(5, 14, 30, 0.16);
}

/* The lime hairline is decoration, not text — safe in both themes. */
.mo-cc-card::before {
  content: '';
  display: block;
  width: 42px;
  height: 2px;
  background: var(--neon);
  margin-bottom: 1.1rem;
}

body.light-mode .mo-cc-card::before {
  background: var(--orange);
}

.mo-cc-h {
  font-family: var(--font-tech);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--platinum);
  margin-bottom: 0.65rem;
}

.mo-cc-p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.7);
}

body.light-mode .mo-cc-p {
  color: rgba(5, 14, 30, 0.66);
}

.mo-cc-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}

.mo-cc-link:hover {
  border-bottom-color: var(--orange);
}

/* ---- Actions ---- */
.mo-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.mo-cc-btn {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.25s ease;
}

/* Reject carries the same visual weight as Accept on purpose — a quieter
   "reject" is exactly what the AEPD treats as invalid consent. */
.mo-cc-solid {
  background: rgba(226, 232, 240, 0.1);
  color: var(--platinum);
}

.mo-cc-solid:hover {
  background: rgba(226, 232, 240, 0.18);
}

body.light-mode .mo-cc-solid {
  background: rgba(5, 14, 30, 0.07);
}

body.light-mode .mo-cc-solid:hover {
  background: rgba(5, 14, 30, 0.12);
}

.mo-cc-accent {
  background: var(--orange);
  border-color: var(--orange);
  color: #050E1E;
}

/* Ink on orange, not white on orange: #FF4F00 with white text is only 3.4:1,
   under the 4.5:1 floor. Ink reads at ~7:1 and works in both themes. */
.mo-cc-accent:hover {
  background: #ff6a26;
  border-color: #ff6a26;
}

.mo-cc-ghost {
  flex: 0 1 auto;
  background: transparent;
  color: rgba(226, 232, 240, 0.6);
}

.mo-cc-ghost:hover {
  color: var(--platinum);
}

body.light-mode .mo-cc-ghost {
  color: rgba(5, 14, 30, 0.55);
}

body.light-mode .mo-cc-ghost:hover {
  color: #050E1E;
}

.mo-cc-btn:focus-visible,
.mo-cc-switch:focus-visible,
.mo-cc-link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ---- Preferences rows ---- */
.mo-cc-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--glass-border);
}

.mo-cc-row-text {
  flex: 1;
}

.mo-cc-row-text h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--platinum);
  margin-bottom: 0.3rem;
}

.mo-cc-row-text p {
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.6);
}

body.light-mode .mo-cc-row-text p {
  color: rgba(5, 14, 30, 0.6);
}

.mo-cc-locked {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.45);
  padding-top: 0.2rem;
}

body.light-mode .mo-cc-locked {
  color: rgba(5, 14, 30, 0.45);
}

/* ---- Switch ---- */
.mo-cc-switch {
  flex-shrink: 0;
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 13px;
  border: 1px solid var(--glass-border);
  background: rgba(226, 232, 240, 0.1);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

body.light-mode .mo-cc-switch {
  background: rgba(5, 14, 30, 0.08);
}

.mo-cc-switch.is-on {
  background: var(--orange);
  border-color: var(--orange);
}

.mo-cc-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--platinum);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mo-cc-switch.is-on .mo-cc-knob {
  transform: translateX(20px);
  background: #fff;
}

/* ---- Policy page ---- */
.mo-doc {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 3.5rem) clamp(1.1rem, 4vw, 2rem) 6rem;
}

.mo-doc h1 {
  font-family: var(--font-tech);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.mo-doc .mo-doc-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.45);
  margin-bottom: 2.6rem;
}

body.light-mode .mo-doc .mo-doc-date {
  color: rgba(5, 14, 30, 0.45);
}

.mo-doc h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2.4rem 0 0.8rem;
  color: var(--platinum);
}

.mo-doc p,
.mo-doc li {
  font-size: 0.94rem;
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.72);
}

body.light-mode .mo-doc p,
body.light-mode .mo-doc li {
  color: rgba(5, 14, 30, 0.72);
}

.mo-doc ul {
  padding-left: 1.2rem;
  margin: 0.6rem 0;
}

.mo-doc li {
  margin-bottom: 0.4rem;
}

.mo-doc a {
  color: var(--orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 79, 0, 0.35);
}

.mo-doc a:hover {
  border-bottom-color: var(--orange);
}

.mo-doc-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 0.4rem;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.mo-doc table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.mo-doc th,
.mo-doc td {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--glass-border);
}

.mo-doc th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.5);
  background: var(--glass);
}

body.light-mode .mo-doc th {
  color: rgba(5, 14, 30, 0.5);
}

.mo-doc td {
  color: rgba(226, 232, 240, 0.75);
  vertical-align: top;
}

body.light-mode .mo-doc td {
  color: rgba(5, 14, 30, 0.75);
}

.mo-doc tr:last-child td {
  border-bottom: none;
}

.mo-doc td code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--orange);
}

.mo-doc-cta {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem 1.3rem;
  border-radius: 10px;
  background: var(--orange);
  color: #050E1E;
  border: none;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease;
}

.mo-doc-cta:hover {
  background: #ff6a26;
}

/* ---- Footer entry point ---- */
.mo-cc-trigger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-legal a,
.footer-legal .mo-cc-trigger {
  font-family: var(--font-main);
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.3);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-legal a:hover,
.footer-legal .mo-cc-trigger:hover {
  color: var(--orange);
}

body.light-mode .footer-legal a,
body.light-mode .footer-legal .mo-cc-trigger {
  color: rgba(5, 14, 30, 0.35);
}

body.light-mode .footer-legal a:hover,
body.light-mode .footer-legal .mo-cc-trigger:hover {
  color: var(--orange);
}

@media (max-width: 600px) {
  .mo-cc {
    width: calc(100vw - 1.5rem);
  }

  .mo-cc-card {
    padding: 1.3rem;
    border-radius: 16px;
  }

  .mo-cc-actions {
    flex-direction: column-reverse;
  }

  .mo-cc-btn {
    width: 100%;
  }
}
