/* ============================================================
   Vegenergy Consent Manager v0.3.1
   Zentraler Cookie-Banner für vegenergy.at und alle Subdomains
   ============================================================ */

@font-face {
  font-family: "Vegenergy Cabin";
  src: url("assets/fonts/Cabin/Cabin-VariableFont_wdth,wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Vegenergy Cabin";
  src: url("assets/fonts/Cabin/Cabin-Italic-VariableFont_wdth,wght.ttf") format("truetype");
  font-style: italic;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --veg-consent-bg: #242424;
  --veg-consent-bg-deep: #181818;
  --veg-consent-surface: rgba(255, 255, 255, 0.035);
  --veg-consent-surface-hover: rgba(255, 255, 255, 0.065);
  --veg-consent-text: #f7f2e8;
  --veg-consent-muted: #c4bfb3;
  --veg-consent-quiet: #8a8579;
  --veg-consent-gold: #d4aa50;
  --veg-consent-gold-soft: rgba(212, 170, 80, 0.18);
  --veg-consent-line: rgba(247, 242, 232, 0.14);
  --veg-consent-line-strong: rgba(247, 242, 232, 0.24);
  --veg-consent-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
  --veg-consent-ease: 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --veg-consent-font: "Vegenergy Cabin", sans-serif;
}

/* Shopify bleibt als Sicherheitsnetz sichtbar, bis unser Manager läuft. */
html.vegenergy-consent-manager #shopify-pc__banner,
html.vegenergy-consent-manager #shopify-pc__prefs {
  display: none !important;
}

.veg-consent-banner[hidden] {
  display: none !important;
}

.veg-consent-banner {
  position: fixed;
  z-index: 10020;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  left: clamp(1rem, 3vw, 2rem);
  width: min(100% - 2rem, 1180px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(212, 170, 80, 0.58);
  border-radius: clamp(0.85rem, 1.6vw, 1.2rem);
  background-color: var(--veg-consent-bg);
  background-size: 200px 200px, auto;
  background-repeat: repeat, no-repeat;
  background-blend-mode: overlay, normal;
  box-shadow: var(--veg-consent-shadow);
  color: var(--veg-consent-text);
  font-family: var(--veg-consent-font);
  opacity: 0;
  transform: translateY(calc(100% + 3rem));
  transition:
    opacity 280ms cubic-bezier(0.22, 0.85, 0.28, 1),
    transform 320ms cubic-bezier(0.22, 0.85, 0.28, 1);
}

.veg-consent-banner--visible {
  opacity: 1;
  transform: translateY(0);
}

.veg-consent-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.9fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: end;
  padding: clamp(1.35rem, 3vw, 2.15rem);
}

.veg-consent-banner__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--veg-consent-gold);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.veg-consent-banner__title {
  margin: 0 0 0.65rem;
  color: var(--veg-consent-text);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.veg-consent-banner__text {
  max-width: 74ch;
  margin: 0;
  color: var(--veg-consent-muted);
  font-size: clamp(0.82rem, 1.1vw, 0.92rem);
  line-height: 1.58;
}

.veg-consent-banner__shop-notice {
  margin: 0.8rem 0 0;
  padding: 0.65rem 0.75rem;
  border-left: 2px solid var(--veg-consent-gold);
  background: rgba(212, 170, 80, 0.07);
  color: var(--veg-consent-muted);
  font-size: 0.75rem;
  line-height: 1.48;
}

.veg-consent-banner__shop-notice[hidden] {
  display: none !important;
}

.veg-consent-banner__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin-top: 0.8rem;
}

.veg-consent-banner__link {
  padding: 0;
  border: none;
  background: none;
  color: var(--veg-consent-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  text-decoration: underline;
  text-decoration-color: rgba(212, 170, 80, 0.55);
  text-underline-offset: 0.18em;
}

.veg-consent-banner__link:hover,
.veg-consent-banner__link:focus-visible {
  color: var(--veg-consent-gold);
}

.veg-consent-banner__link:focus-visible {
  outline: 2px solid rgba(212, 170, 80, 0.42);
  outline-offset: 2px;
  border-radius: 3px;
}

.veg-consent-banner__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.veg-consent-button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(212, 170, 80, 0.72);
  border-radius: 10px;
  background: rgba(212, 170, 80, 0.1);
  color: var(--veg-consent-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 740;
  line-height: 1.2;
  text-align: center;
  transition:
    background-color var(--veg-consent-ease),
    border-color var(--veg-consent-ease),
    color var(--veg-consent-ease);
}

.veg-consent-button:hover {
  border-color: var(--veg-consent-gold);
  background: rgba(212, 170, 80, 0.2);
  color: #fffaf0;
}

.veg-consent-button:focus-visible {
  border-color: var(--veg-consent-gold);
  outline: 2px solid rgba(212, 170, 80, 0.42);
  outline-offset: 2px;
}

.veg-consent-button--settings {
  grid-column: 1 / -1;
  border-color: var(--veg-consent-line-strong);
  background: var(--veg-consent-surface);
}

/* ============================================================
   EINSTELLUNGS-DRAWER
   ============================================================ */

.veg-consent-settings {
  color: var(--veg-consent-text);
}

.veg-consent-settings__intro {
  padding: 0 0 1.2rem;
  border-bottom: 1px solid var(--veg-consent-line);
}

.veg-consent-settings__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--veg-consent-gold);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.veg-consent-settings__title {
  max-width: 24ch;
  margin: 0 0 0.75rem;
  color: var(--veg-consent-text);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.veg-consent-settings__lead {
  max-width: 82ch;
  margin: 0;
  color: var(--veg-consent-muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.veg-consent-settings__notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(212, 170, 80, 0.2);
  border-radius: 10px;
  background: rgba(212, 170, 80, 0.07);
  color: var(--veg-consent-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.veg-consent-settings__notice-icon {
  color: var(--veg-consent-gold);
  font-weight: 800;
}

.veg-consent-settings__actions {
  position: sticky;
  z-index: 3;
  top: -1px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0 -0.35rem;
  padding: 1rem 0.35rem;
  border-bottom: 1px solid var(--veg-consent-line);
  background: rgba(36, 36, 36, 0.96);
  backdrop-filter: blur(10px);
}

.veg-consent-settings__section-heading {
  margin: 1.45rem 0 0.75rem;
  color: var(--veg-consent-text);
  font-size: 0.95rem;
  font-weight: 740;
  letter-spacing: 0.01em;
}

.veg-consent-category-list {
  display: grid;
  gap: 0.8rem;
}

.veg-consent-category {
  overflow: hidden;
  border: 1px solid var(--veg-consent-line);
  border-radius: 12px;
  background: var(--veg-consent-surface);
  transition:
    border-color var(--veg-consent-ease),
    background-color var(--veg-consent-ease);
}

.veg-consent-category:hover {
  border-color: rgba(212, 170, 80, 0.32);
  background: var(--veg-consent-surface-hover);
}

.veg-consent-category__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.05rem;
}

.veg-consent-category__title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.veg-consent-category__title {
  margin: 0;
  color: var(--veg-consent-text);
  font-size: 0.9rem;
  font-weight: 740;
}

.veg-consent-category__badge {
  display: inline-flex;
  padding: 0.18rem 0.48rem;
  border: 1px solid rgba(212, 170, 80, 0.24);
  border-radius: 999px;
  color: var(--veg-consent-gold);
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.veg-consent-category__summary {
  max-width: 78ch;
  margin: 0;
  color: var(--veg-consent-muted);
  font-size: 0.78rem;
  line-height: 1.52;
}

.veg-consent-toggle {
  position: relative;
  display: inline-flex;
  min-width: 3.25rem;
  min-height: 2.15rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.veg-consent-toggle__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.veg-consent-toggle__track {
  position: relative;
  display: block;
  width: 3rem;
  height: 1.65rem;
  border: 1px solid var(--veg-consent-line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition:
    background-color 240ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.veg-consent-toggle__track::after {
  position: absolute;
  top: 50%;
  left: 0.2rem;
  width: 1.18rem;
  height: 1.18rem;
  margin-top: -0.59rem;
  border-radius: 50%;
  background: var(--veg-consent-muted);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.38);
  content: "";
  transition:
    background-color 240ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.veg-consent-toggle__input:checked + .veg-consent-toggle__track {
  border-color: rgba(212, 170, 80, 0.72);
  background: rgba(212, 170, 80, 0.34);
}

.veg-consent-toggle__input:checked + .veg-consent-toggle__track::after {
  background: var(--veg-consent-gold);
  transform: translateX(1.36rem);
}

.veg-consent-toggle__input:focus-visible + .veg-consent-toggle__track {
  outline: 2px solid rgba(212, 170, 80, 0.42);
  outline-offset: 3px;
}

.veg-consent-toggle__input:disabled + .veg-consent-toggle__track {
  cursor: not-allowed;
  opacity: 0.72;
}

.veg-consent-category__details {
  border-top: 1px solid var(--veg-consent-line);
}

.veg-consent-category__details summary {
  padding: 0.78rem 1.05rem;
  color: var(--veg-consent-gold);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 720;
  list-style-position: inside;
}

.veg-consent-category__details summary:hover {
  background: rgba(212, 170, 80, 0.05);
}

.veg-consent-category__details-body {
  padding: 0 1.05rem 1rem;
}

.veg-consent-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.veg-consent-fact {
  padding: 0.75rem;
  border: 1px solid var(--veg-consent-line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.12);
}

.veg-consent-fact__label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--veg-consent-quiet);
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.veg-consent-fact__value {
  color: var(--veg-consent-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.veg-consent-service-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.veg-consent-service {
  display: grid;
  grid-template-columns: minmax(9rem, 0.72fr) minmax(0, 1.7fr);
  gap: 0.75rem;
  padding: 0.72rem 0;
  border-top: 1px solid var(--veg-consent-line);
}

.veg-consent-service__name {
  color: var(--veg-consent-text);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.45;
}

.veg-consent-service__meta {
  margin-top: 0.15rem;
  color: var(--veg-consent-quiet);
  font-size: 0.64rem;
  font-weight: 550;
}

.veg-consent-service__description {
  margin: 0;
  color: var(--veg-consent-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.veg-consent-settings__footer {
  margin-top: 1.35rem;
  padding: 1rem;
  border: 1px solid var(--veg-consent-line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--veg-consent-muted);
  font-size: 0.74rem;
  line-height: 1.58;
}

.veg-consent-settings__footer a,
.veg-consent-settings__footer-link {
  color: var(--veg-consent-gold);
  text-underline-offset: 0.18em;
}

.veg-consent-settings__footer-link {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.veg-consent-settings__footer-link:hover {
  color: #fffaf0;
}

.veg-consent-status {
  position: fixed;
  z-index: 10030;
  right: 1.25rem;
  bottom: 1.25rem;
  max-width: min(90vw, 28rem);
  padding: 0.8rem 1rem;
  border: 1px solid rgba(212, 170, 80, 0.45);
  border-radius: 10px;
  background: #242424;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  color: var(--veg-consent-text);
  font-size: 0.76rem;
  line-height: 1.45;
}

@media screen and (max-width: 820px) {
  .veg-consent-banner__inner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .veg-consent-facts {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 620px) {
  .veg-consent-banner {
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border: none;
    border-top: 1px solid rgba(212, 170, 80, 0.58);
    border-radius: clamp(1.2rem, 4vw, 1.5rem) clamp(1.2rem, 4vw, 1.5rem) 0 0;
  }

  .veg-consent-banner__inner {
    gap: 1rem;
    max-height: calc(100vh - 1.3rem);
    overflow-y: auto;
    padding: 1.15rem;
  }

  .veg-consent-banner__actions,
  .veg-consent-settings__actions {
    grid-template-columns: 1fr;
  }

  .veg-consent-button--settings {
    grid-column: auto;
  }

  .veg-consent-category__main {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.9rem;
  }

  .veg-consent-category__details summary,
  .veg-consent-category__details-body {
    padding-right: 0.9rem;
    padding-left: 0.9rem;
  }

  .veg-consent-service {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .veg-consent-banner,
  .veg-consent-button,
  .veg-consent-category,
  .veg-consent-toggle__track,
  .veg-consent-toggle__track::after {
    transition-duration: 0.01ms !important;
  }
}
