/* Aetherion Cookie Consent — restored luxury styling / Patch 4 Hotfix v5 */
:root {
  --ae-cc-bg: rgba(16, 14, 13, 0.94);
  --ae-cc-panel: rgba(19, 17, 19, 0.98);
  --ae-cc-text: #f5ead8;
  --ae-cc-muted: rgba(245, 234, 216, 0.72);
  --ae-cc-border: rgba(225, 194, 135, 0.22);
  --ae-cc-gold: #d8b36d;
  --ae-cc-gold-strong: #f1cf8e;
  --ae-cc-dark: #d8b36d;
  --ae-cc-dark-hover: #f1cf8e;
  --ae-cc-radius: 22px;
  --ae-cc-radius-sm: 14px;
  --ae-cc-shadow: 0 28px 90px rgba(0, 0, 0, 0.46), 0 0 60px rgba(216, 179, 109, 0.09);
  --ae-cc-z: 999999;
}

body.ae-consent-pending {
  overflow: auto;
}

body.ae-cookie-preferences-open {
  overflow: hidden;
}

.ae-cookie-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--ae-cc-z) !important;
  display: none;
  pointer-events: none;
  background:
    radial-gradient(circle at top, rgba(216, 179, 109, 0.12), transparent 38%),
    rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

body.ae-consent-pending .ae-cookie-overlay {
  display: none !important;
}

body.ae-cookie-preferences-open .ae-cookie-overlay {
  display: block !important;
  pointer-events: auto;
}

.ae-cookie-bar {
  position: fixed !important;
  left: 24px !important;
  right: 24px !important;
  bottom: 24px !important;
  z-index: calc(var(--ae-cc-z) + 1) !important;
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid var(--ae-cc-border);
  border-radius: var(--ae-cc-radius);
  background: linear-gradient(145deg, rgba(23, 20, 18, 0.97), rgba(12, 11, 11, 0.97));
  box-shadow: var(--ae-cc-shadow);
  color: var(--ae-cc-text);
}

body.ae-consent-pending .ae-cookie-bar,
body.ae-consent-ready .ae-cookie-bar.ae-cookie-bar--force-open {
  display: block !important;
}

.ae-cookie-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ae-cookie-bar__text {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ae-cc-muted);
  flex: 1 1 auto;
}

.ae-cookie-bar__text a {
  color: var(--ae-cc-gold-strong);
  text-decoration: none;
  border-bottom: 1px solid rgba(216, 179, 109, 0.38);
}

.ae-cookie-bar__actions,
.ae-cookie-panel__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ae-cookie-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  color: var(--ae-cc-text);
  background: rgba(255, 255, 255, 0.04);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ae-cookie-btn:hover {
  transform: translateY(-1px);
}

.ae-cookie-btn:focus-visible,
.ae-cookie-toggle:focus-visible {
  outline: 2px solid rgba(216, 179, 109, 0.5);
  outline-offset: 2px;
}

.ae-cookie-btn--dark {
  background: linear-gradient(135deg, #f0cf8f, #d8b36d);
  color: #17110a;
  border-color: rgba(255, 238, 192, 0.45);
  box-shadow: 0 12px 28px rgba(216, 179, 109, 0.18);
}

.ae-cookie-btn--dark:hover {
  background: linear-gradient(135deg, #ffe0a6, #e3bd75);
}

.ae-cookie-btn--outline {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(216, 179, 109, 0.28);
  color: #f5ead8;
}

.ae-cookie-btn--outline:hover,
.ae-cookie-btn--ghost:hover {
  background: rgba(216, 179, 109, 0.1);
  border-color: rgba(216, 179, 109, 0.4);
}

.ae-cookie-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--ae-cc-muted);
}

.ae-cookie-panel {
  position: fixed !important;
  left: 24px !important;
  right: 24px !important;
  bottom: 112px !important;
  z-index: calc(var(--ae-cc-z) + 2) !important;
  display: none;
  max-width: 620px;
  margin-left: auto;
  padding: 24px;
  border: 1px solid var(--ae-cc-border);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(24, 21, 20, 0.99), rgba(12, 11, 12, 0.99));
  box-shadow: var(--ae-cc-shadow);
  color: var(--ae-cc-text);
}

.ae-cookie-panel.is-open {
  display: block !important;
}

.ae-cookie-panel__title {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  line-height: 1.18;
  font-weight: 700;
  color: #fff7ea;
}

.ae-cookie-panel__copy {
  margin: 0 0 20px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ae-cc-muted);
}

.ae-cookie-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid rgba(225, 194, 135, 0.14);
}

.ae-cookie-option:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.ae-cookie-option__content {
  min-width: 0;
}

.ae-cookie-option__label {
  display: block;
  margin-bottom: 5px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #fff4df;
}

.ae-cookie-option__desc {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ae-cc-muted);
}

.ae-cookie-option__fixed {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(216, 179, 109, 0.1);
  border: 1px solid rgba(216, 179, 109, 0.18);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  color: rgba(245, 234, 216, 0.78);
  white-space: nowrap;
}

.ae-cookie-toggle {
  position: relative;
  appearance: none;
  width: 54px;
  height: 32px;
  border: 1px solid rgba(216, 179, 109, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  flex: 0 0 auto;
}

.ae-cookie-toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff7ea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease;
}

.ae-cookie-toggle[aria-checked="true"] {
  background: linear-gradient(135deg, #f0cf8f, #d8b36d);
  border-color: rgba(255, 238, 192, 0.55);
}

.ae-cookie-toggle[aria-checked="true"]::after {
  transform: translateX(22px);
  background: #17110a;
}

.ae-cookie-panel__actions {
  justify-content: flex-end;
  margin-top: 22px;
}

@media (max-width: 840px) {
  .ae-cookie-bar {
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    padding: 14px;
  }

  .ae-cookie-bar__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .ae-cookie-bar__actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .ae-cookie-btn {
    flex: 1 1 auto;
  }

  .ae-cookie-panel {
    left: 16px !important;
    right: 16px !important;
    bottom: 128px !important;
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .ae-cookie-panel__title { font-size: 24px; }
  .ae-cookie-bar__actions,
  .ae-cookie-panel__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ae-cookie-option {
    flex-direction: column;
    align-items: flex-start;
  }
  .ae-cookie-option__fixed { min-height: auto; }
}


/* Aetherion clean cookie UX fix — preferences panel opens only by explicit Customize click */
body:not(.ae-cookie-preferences-open) .ae-cookie-overlay {
  display: none !important;
  pointer-events: none !important;
}

body:not(.ae-cookie-preferences-open) .ae-cookie-panel,
body:not(.ae-cookie-preferences-open) .ae-cookie-panel.is-open {
  display: none !important;
}

body.ae-cookie-preferences-open .ae-cookie-overlay {
  display: block !important;
  pointer-events: auto !important;
}

body.ae-cookie-preferences-open .ae-cookie-panel.is-open {
  display: block !important;
}
