/* ==========================================================================
   Cookie-/Consent-Layer (assets/js/hoesch-consent.js)
   --------------------------------------------------------------------------
   Standalone-Komponente fuer Banner, Einstellungsmodal, Footer-Button
   "Cookie-Einstellungen" und Google-Maps-Platzhalter.

   Bewusst nur .hoesch-consent-* plus der Footer-Einbettung gescopt, damit die
   Startseite keine generischen Page-/Card-Styles aus hoesch-pages.v1.css laden
   muss. Farb-Tokens stammen aus common_style.v2.css, Fallbacks sind enthalten.
   ========================================================================== */

.hoesch-consent {
  font-family: "Inter", sans-serif;
}

/* --- Banner ------------------------------------------------------------- */
.hoesch-consent-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 1000000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  width: min(1100px, calc(100% - 32px));
  padding: 18px 22px;
  border: 1px solid rgba(var(--color-myprimary-rgb, 2, 36, 36), 0.14);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(2, 36, 36, 0.22);
  color: var(--color-text, #0f172a);
}

.hoesch-consent-banner[hidden] {
  display: none;
}

.hoesch-consent-banner__text {
  flex: 1 1 320px;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
}

.hoesch-consent-banner__text-p {
  margin: 0;
}

.hoesch-consent-banner__text-p + .hoesch-consent-banner__text-p {
  margin-top: 4px;
}

.hoesch-consent-banner__actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hoesch-consent-link,
.hoesch-consent-banner__link {
  color: var(--color-smaragd, #2D574F);
  text-decoration: underline;
}

.hoesch-consent-link:hover,
.hoesch-consent-banner__link:hover {
  color: var(--color-myprimary, #022424);
}

/* --- Buttons ------------------------------------------------------------ */
.hoesch-consent-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.hoesch-consent-btn:focus-visible {
  outline: 2px solid var(--color-gold, #DCBF6A);
  outline-offset: 2px;
}

.hoesch-consent-btn--primary {
  background: var(--color-myprimary, #022424);
  border-color: var(--color-myprimary, #022424);
  color: #ffffff;
}

.hoesch-consent-btn--primary:hover,
.hoesch-consent-btn--primary:focus-visible {
  background: var(--color-gold, #DCBF6A);
  border-color: var(--color-gold, #DCBF6A);
  color: var(--color-myprimary, #022424);
}

.hoesch-consent-btn--ghost {
  background: transparent;
  border-color: rgba(var(--color-myprimary-rgb, 2, 36, 36), 0.4);
  color: var(--color-myprimary, #022424);
}

.hoesch-consent-btn--ghost:hover,
.hoesch-consent-btn--ghost:focus-visible {
  background: var(--color-myprimary, #022424);
  border-color: var(--color-myprimary, #022424);
  color: #ffffff;
}

/* --- Overlay + Modal ---------------------------------------------------- */
.hoesch-consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 36, 36, 0.55);
}

.hoesch-consent-overlay[hidden] {
  display: none;
}

.hoesch-consent-modal {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(2, 36, 36, 0.34);
  color: var(--color-text, #0f172a);
  overflow: hidden;
}

.hoesch-consent-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(var(--color-myprimary-rgb, 2, 36, 36), 0.1);
}

.hoesch-consent-modal__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-myprimary, #022424);
}

.hoesch-consent-modal__close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-myprimary, #022424);
  cursor: pointer;
}

.hoesch-consent-modal__close:hover,
.hoesch-consent-modal__close:focus-visible {
  background: rgba(var(--color-myprimary-rgb, 2, 36, 36), 0.08);
}

.hoesch-consent-modal__close:focus-visible {
  outline: 2px solid var(--color-gold, #DCBF6A);
  outline-offset: 2px;
}

.hoesch-consent-modal__body {
  padding: 18px 22px;
  overflow-y: auto;
}

.hoesch-consent-modal__intro {
  margin: 0 0 16px;
  font-size: 0.875rem;
  line-height: 1.55;
}

.hoesch-consent-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid rgba(var(--color-myprimary-rgb, 2, 36, 36), 0.1);
}

/* --- Kategorien --------------------------------------------------------- */
.hoesch-consent-cats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hoesch-consent-cat {
  padding: 14px 16px;
  border: 1px solid rgba(var(--color-myprimary-rgb, 2, 36, 36), 0.12);
  border-radius: 12px;
  background: var(--color-background, #FDF8EF);
}

.hoesch-consent-cat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--color-myprimary, #022424);
  cursor: pointer;
}

.hoesch-consent-cat__switch {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--color-smaragd, #2D574F);
}

.hoesch-consent-cat__switch:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.hoesch-consent-cat__name {
  font-size: 0.9375rem;
}

.hoesch-consent-cat__desc {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(var(--color-text-rgb, 15, 23, 42), 0.78);
}

.hoesch-consent-services {
  margin: 10px 0 0;
  padding: 0 0 0 28px;
  list-style: disc;
}

.hoesch-consent-service {
  margin: 4px 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.hoesch-consent-service__meta {
  display: block;
  font-size: 0.75rem;
  color: rgba(var(--color-text-rgb, 15, 23, 42), 0.6);
}

/* --- Footer-Button "Cookie-Einstellungen" ------------------------------- */
.hoesch-consent-footer-link {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.hoesch-consent-footer-link:hover,
.hoesch-consent-footer-link:focus-visible {
  text-decoration: underline;
}

.tc-footer-style1 .footer-links .hoesch-consent-footer-link {
  display: block;
  font-size: 14px;
  color: #666;
  margin: 5px 0;
}

.tc-footer-style1 .footer-links .hoesch-consent-footer-link:hover,
.tc-footer-style1 .footer-links .hoesch-consent-footer-link:focus-visible {
  color: #000;
  text-decoration: underline;
}

/* --- Karten-Platzhalter ------------------------------------------------- */
.hoesch-consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(var(--color-myprimary-rgb, 2, 36, 36), 0.3);
  border-radius: 12px;
  background: var(--color-background, #FDF8EF);
}

.hoesch-consent-placeholder[hidden] {
  display: none;
}

.hoesch-consent-placeholder__text {
  margin: 0;
  max-width: 46ch;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text, #0f172a);
}

/* --- Responsiv ---------------------------------------------------------- */
@media (max-width: 575px) {
  .hoesch-consent-banner {
    bottom: 0;
    width: 100%;
    border-radius: 14px 14px 0 0;
    padding: 16px;
  }

  .hoesch-consent-banner__actions {
    width: 100%;
  }

  .hoesch-consent-banner__actions .hoesch-consent-btn {
    flex: 1 1 auto;
  }

  .hoesch-consent-modal__footer .hoesch-consent-btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hoesch-consent-btn {
    transition: none;
  }
}
