/* ------------------------------------------------------------------ *
 * Cookie consent banner + preferences modal.
 * Vanilla CSS (no framework). Matches the CE Chrysanthou dark theme.
 * Injected on every page by scripts/convert.js; behaviour lives in
 * js/cookie-consent.js.
 * ------------------------------------------------------------------ */

.cc-root,
.cc-root * {
  box-sizing: border-box;
}

/* contact-form honeypot: hidden from users, visible to naive bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.cc-root {
  --cc-bg: #0a0a0a;
  --cc-surface: #141414;
  --cc-border: #2a2a2a;
  --cc-text: #f4f4f4;
  --cc-muted: #a7adba;
  --cc-accent: #ffffff;
  --cc-accent-text: #060606;
  font-family: Montserrat, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* hidden by default; JS adds .cc-visible once it decides to show it */
.cc-banner,
.cc-modal-overlay {
  display: none;
}

.cc-banner.cc-visible,
.cc-modal-overlay.cc-visible {
  display: block;
}

/* ------------------------------------------------------------- banner */

.cc-banner {
  position: fixed;
  z-index: 2147483000;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--cc-bg);
  color: var(--cc-text);
  border-top: 1px solid var(--cc-border);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
  padding: 22px 24px calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateY(110%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-banner.cc-in {
  transform: translateY(0);
}

.cc-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.cc-banner-copy {
  flex: 1 1 420px;
  min-width: 260px;
}

.cc-banner-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.cc-banner-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--cc-muted);
  margin: 0;
}

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

.cc-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------- buttons */

.cc-btn {
  font-family: Montserrat, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.cc-btn:focus-visible {
  outline: 2px solid #6ea8ff;
  outline-offset: 2px;
}

.cc-btn-primary {
  background-color: var(--cc-accent);
  color: var(--cc-accent-text);
  border-color: var(--cc-accent);
}

.cc-btn-primary:hover {
  opacity: 0.85;
}

.cc-btn-secondary {
  background-color: transparent;
  color: var(--cc-text);
  border-color: #4a4a4a;
}

.cc-btn-secondary:hover {
  border-color: var(--cc-text);
}

.cc-btn-link {
  background: none;
  border: none;
  color: var(--cc-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 1px;
  padding: 8px 4px;
}

.cc-btn-link:hover {
  color: var(--cc-text);
}

/* --------------------------------------------------------- modal */

.cc-modal-overlay {
  position: fixed;
  z-index: 2147483001;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 24px;
  overflow-y: auto;
}

.cc-modal {
  background-color: var(--cc-surface);
  color: var(--cc-text);
  border: 1px solid var(--cc-border);
  max-width: 640px;
  margin: 6vh auto;
  padding: 32px 32px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cc-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.cc-modal-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

.cc-modal-close {
  background: none;
  border: none;
  color: var(--cc-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.cc-modal-close:hover {
  color: var(--cc-text);
}

.cc-modal-intro {
  font-size: 13px;
  line-height: 1.6;
  color: var(--cc-muted);
  margin: 0 0 20px;
}

.cc-modal-intro a {
  color: var(--cc-text);
  text-decoration: underline;
}

/* -------------------------------------------------- category rows */

.cc-cat {
  border-top: 1px solid var(--cc-border);
  padding: 18px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.cc-cat-body {
  flex: 1 1 auto;
}

.cc-cat-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.cc-cat-desc {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--cc-muted);
  margin: 0;
}

.cc-cat-control {
  flex: 0 0 auto;
  padding-top: 2px;
}

.cc-cat-always {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cc-muted);
}

/* toggle switch */
.cc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
}

.cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cc-slider {
  position: absolute;
  inset: 0;
  background-color: #3a3a3a;
  border-radius: 26px;
  transition: background-color 0.2s ease;
  pointer-events: none;
}

.cc-slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-slider {
  background-color: #2e7d32;
}

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

.cc-switch input:focus-visible + .cc-slider {
  outline: 2px solid #6ea8ff;
  outline-offset: 2px;
}

.cc-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.cc-modal-actions .cc-btn {
  flex: 1 1 auto;
  text-align: center;
}

/* ------------------------------------------------- responsive */

@media (max-width: 720px) {
  .cc-banner {
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .cc-banner-inner {
    gap: 16px;
  }

  .cc-actions {
    width: 100%;
  }

  .cc-actions .cc-btn-primary,
  .cc-actions .cc-btn-secondary {
    flex: 1 1 auto;
    text-align: center;
  }

  .cc-modal {
    padding: 24px 20px;
    margin: 4vh auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner {
    transition: none;
  }
}
