/**
 * ge-cookie.css — Gallium Estate Cookie-Banner
 * Ausgelagert aus template-parts/cookie-banner.php (v73)
 * Premium Cookie-Banner mit Consent-Management
 */

/* ═══════════════════════════════════════
   COOKIE BANNER — Gallium Estate Premium
═══════════════════════════════════════ */
.ge-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  width: min(920px, calc(100vw - 32px));
  background: rgba(8, 16, 32, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(201,168,106,.22);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(201,168,106,.08);
  animation: ge-banner-in .35s cubic-bezier(.16,1,.3,1) both;
}
.ge-cookie-banner[hidden] { display: none; }
@keyframes ge-banner-in {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.ge-cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  flex-wrap: wrap;
}
.ge-cookie-banner__content {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 240px;
}
.ge-cookie-banner__icon {
  color: var(--gold, #C9A86A);
  flex-shrink: 0;
  opacity: .85;
}
.ge-cookie-banner__text {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
}
.ge-cookie-banner__text strong {
  color: #fff;
  display: block;
  margin-bottom: 3px;
}
.ge-cookie-banner__link {
  color: var(--gold, #C9A86A);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 4px;
}
.ge-cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* Buttons */
.ge-cookie-btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.ge-cookie-btn--accept {
  background: linear-gradient(135deg, var(--gold, #C9A86A), var(--gold-d, #9A7030));
  color: #fff;
  box-shadow: 0 4px 16px rgba(201,168,106,.3);
}
.ge-cookie-btn--accept:hover {
  box-shadow: 0 6px 24px rgba(201,168,106,.45);
  transform: translateY(-1px);
}
.ge-cookie-btn--settings {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.1);
}
.ge-cookie-btn--settings:hover {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
}
.ge-cookie-btn--reject {
  background: transparent;
  color: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.12);
}
.ge-cookie-btn--reject:hover { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.25); }

/* Settings Panel */
.ge-cookie-settings { display: contents; }
.ge-cookie-settings[hidden] { display: none; }
.ge-cookie-settings__backdrop {
  position: fixed; inset: 0; z-index: 99998;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
  animation: ge-fade-in .2s ease both;
}
@keyframes ge-fade-in { from { opacity: 0; } to { opacity: 1; } }
.ge-cookie-settings__box {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  width: min(580px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: #0c1a2e;
  border: 1px solid rgba(201,168,106,.2);
  border-radius: 20px;
  box-shadow: 0 32px 96px rgba(0,0,0,.6);
  animation: ge-box-in .3s cubic-bezier(.16,1,.3,1) both;
}
@keyframes ge-box-in {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.96); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.ge-cookie-settings__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ge-cookie-settings__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; font-weight: 300; color: #fff; margin: 0;
}
.ge-cookie-settings__close {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5); cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: background-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ge-cookie-settings__close:hover { background: rgba(255,255,255,.1); color: #fff; }
.ge-cookie-settings__body { padding: 24px; }
.ge-cookie-settings__intro {
  font-size: 13px; color: rgba(255,255,255,.45); line-height: 1.7; margin: 0 0 24px;
}
.ge-cookie-settings__intro a { color: var(--gold, #C9A86A); }
.ge-cookie-settings__footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.07);
  flex-wrap: wrap;
}

/* Cookie Groups */
.ge-cookie-group {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; overflow: hidden; margin-bottom: 12px;
}
.ge-cookie-group:last-child { margin-bottom: 0; }
.ge-cookie-group__header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding: 16px 18px;
  background: rgba(255,255,255,.03);
}
.ge-cookie-group__name { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.ge-cookie-group__desc { font-size: 12px; color: rgba(255,255,255,.38); line-height: 1.5; }
.ge-cookie-toggle--locked .ge-cookie-toggle__label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #4ade80; border: 1px solid rgba(74,222,128,.25);
  background: rgba(74,222,128,.08); border-radius: 100px; padding: 3px 10px;
  white-space: nowrap;
}
/* Cookie list */
.ge-cookie-list { padding: 0 18px 14px; }
.ge-cookie-item {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 8px 16px; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 11.5px;
}
.ge-cookie-item:last-child { border-bottom: none; }
.ge-cookie-item__name { font-weight: 700; color: rgba(255,255,255,.6); font-family: monospace; }
.ge-cookie-item__purpose { color: rgba(255,255,255,.35); }
.ge-cookie-item__dur { color: rgba(201,168,106,.6); white-space: nowrap; }

/* Toggle switch */
.ge-cookie-toggle { display: flex; align-items: center; flex-shrink: 0; }
.ge-cookie-toggle__input { position: absolute; opacity: 0; width: 0; height: 0; }
.ge-cookie-toggle__slider {
  width: 44px; height: 24px; border-radius: 100px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  position: relative; cursor: pointer; transition: background-color .25s ease, opacity .25s ease, transform .25s ease;
}
.ge-cookie-toggle__slider::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255,255,255,.4); transition: background-color .25s ease, opacity .25s ease, transform .25s ease;
}
.ge-cookie-toggle__input:checked + .ge-cookie-toggle__slider {
  background: linear-gradient(135deg, var(--gold, #C9A86A), var(--gold-d, #9A7030));
  border-color: transparent;
}
.ge-cookie-toggle__input:checked + .ge-cookie-toggle__slider::after {
  left: 22px; background: #fff;
}

/* ═══════════════════════════════════════
   MOBILE — echter Bottom-Sheet-Stil
   Slide-up von unten, volle Breite, flache Unterkante
═══════════════════════════════════════ */
@media (max-width: 600px) {

  /* Bottom-Sheet: am Bildschirmrand verankert */
  .ge-cookie-banner {
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    border-radius: 18px 18px 0 0 !important;
    border-bottom: none !important;
    max-height: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* Safe-Area für iPhone Home-Indicator */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Slide-up Animation statt translateX */
  @keyframes ge-banner-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Kompaktes einzeiliges Layout */
  .ge-cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
    flex-wrap: nowrap;
  }

  /* Icon ausblenden auf Mobile — spart Platz */
  .ge-cookie-banner__icon {
    display: none;
  }

  /* Kompakter Text */
  .ge-cookie-banner__content {
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    flex: 1;
  }
  .ge-cookie-banner__text {
    font-size: 11.5px;
    line-height: 1.4;
  }
  .ge-cookie-banner__text strong {
    font-size: 12px;
    margin-bottom: 1px;
    display: inline;
  }
  /* Datenschutz-Link auf Mobile kompakt */
  .ge-cookie-banner__link {
    display: none;
  }

  /* Buttons rechts, nebeneinander, kompakt */
  .ge-cookie-banner__actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
  }
  .ge-cookie-btn {
    min-width: 80px;
    padding: 9px 14px;
    font-size: 11px;
    letter-spacing: .04em;
    white-space: nowrap;
    border-radius: 8px;
  }

  /* Settings-Panel: volle Breite, von unten */
  .ge-cookie-settings__box {
    position: fixed;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    transform: none !important;
    max-height: calc(100dvh - 48px);
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .ge-cookie-settings__header,
  .ge-cookie-settings__body,
  .ge-cookie-settings__footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ge-cookie-group__header {
    flex-direction: column;
    gap: 10px;
  }
  .ge-cookie-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
