/*
 * Haus Avallon Consent 1.1.1 – weiches Design
 * Ausschließlich Darstellung; die Consent-Logik bleibt unverändert.
 */
.ha-consent,
.ha-consent * {
  box-sizing: border-box;
}

.ha-consent[hidden],
.ha-consent [hidden] {
  display: none !important;
}

html.ha-consent-lock {
  overflow: hidden;
}

.ha-consent {
  --ha-accent: #667765;
  --ha-accent-dark: #4f6150;
  --ha-text: #292c29;
  --ha-muted: #686d68;
  --ha-border: rgba(54, 61, 55, .13);
  --ha-surface: #fffdf9;
  --ha-soft: #f7f4ee;
  --ha-shadow: 0 24px 70px rgba(28, 34, 29, .18), 0 4px 16px rgba(28, 34, 29, .08);
  color: var(--ha-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  position: relative;
  z-index: 2147483000;
}

.ha-consent button,
.ha-consent a {
  font: inherit;
}

.ha-consent__backdrop {
  background: rgba(26, 30, 27, .34);
  inset: 0;
  position: fixed;
  z-index: 2147483001;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: ha-consent-fade-in .18s ease-out both;
}

.ha-consent__banner {
  align-items: center;
  background: var(--ha-surface);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 22px 22px 0 0;
  bottom: 0;
  box-shadow: 0 -12px 42px rgba(28, 34, 29, .16);
  display: flex;
  gap: 30px;
  left: 50%;
  max-width: 1120px;
  padding: 27px clamp(22px, 4vw, 52px) 23px;
  position: fixed;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  z-index: 2147483002;
  animation: ha-consent-rise-in .22s cubic-bezier(.2, .8, .2, 1) both;
}

.ha-consent__banner::before,
.ha-consent__modal::before {
  background: var(--ha-accent);
  border-radius: 0 0 999px 999px;
  content: "";
  height: 4px;
  left: 50%;
  opacity: .8;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 84px;
}

.ha-consent__banner-copy {
  flex: 1 1 auto;
  margin: 0;
  max-width: 760px;
  width: 100%;
}

.ha-consent__eyebrow {
  color: var(--ha-accent-dark) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .13em;
  line-height: 1.3 !important;
  margin: 0 0 5px !important;
  text-transform: uppercase !important;
}

.ha-consent h2,
.ha-consent h3,
.ha-consent p {
  color: inherit;
  font-family: inherit !important;
  text-transform: none !important;
}

.ha-consent h2 {
  color: var(--ha-text) !important;
  font-size: clamp(23px, 3vw, 30px) !important;
  font-weight: 600 !important;
  letter-spacing: -.02em;
  line-height: 1.2 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

.ha-consent h3 {
  color: var(--ha-text) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
}

.ha-consent p {
  color: var(--ha-muted) !important;
  margin: 0 0 10px !important;
}

.ha-consent__links {
  font-size: 12px;
  margin-bottom: 0 !important;
}

.ha-consent__links a,
.ha-consent__links a:visited {
  color: var(--ha-muted) !important;
  text-decoration: underline;
  text-decoration-color: rgba(78, 88, 80, .3);
  text-underline-offset: 3px;
}

.ha-consent__links a:hover {
  color: var(--ha-text) !important;
  text-decoration-color: currentColor;
}

.ha-consent__banner-actions {
  display: grid;
  flex: 0 0 300px;
  gap: 9px;
}

.ha-consent__button,
.ha-consent-placeholder__button {
  align-items: center;
  appearance: none;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  cursor: pointer;
  display: inline-flex;
  font-size: 14px !important;
  font-weight: 600 !important;
  justify-content: center;
  line-height: 1.2 !important;
  min-height: 45px;
  padding: 11px 20px !important;
  text-align: center;
  text-decoration: none !important;
  text-transform: none !important;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  width: 100%;
}

.ha-consent__button:hover,
.ha-consent-placeholder__button:hover {
  transform: translateY(-1px);
}

.ha-consent__button:active,
.ha-consent-placeholder__button:active {
  transform: translateY(0);
}

.ha-consent__button--primary,
.ha-consent-placeholder__button {
  background: var(--ha-accent) !important;
  border-color: var(--ha-accent) !important;
  box-shadow: 0 7px 18px rgba(65, 82, 66, .18) !important;
  color: #fff !important;
}

.ha-consent__button--primary:hover,
.ha-consent__button--primary:focus-visible,
.ha-consent-placeholder__button:hover,
.ha-consent-placeholder__button:focus-visible {
  background: var(--ha-accent-dark) !important;
  border-color: var(--ha-accent-dark) !important;
  box-shadow: 0 9px 22px rgba(65, 82, 66, .22) !important;
  color: #fff !important;
}

.ha-consent__button--secondary {
  background: var(--ha-soft) !important;
  border-color: var(--ha-border) !important;
  color: var(--ha-text) !important;
}

.ha-consent__button--secondary:hover,
.ha-consent__button--secondary:focus-visible {
  background: #f0ede7 !important;
  border-color: rgba(71, 82, 73, .24) !important;
  color: var(--ha-text) !important;
}

.ha-consent__button--text {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--ha-muted) !important;
  min-height: 36px;
  padding: 7px 10px !important;
}

.ha-consent__button--text:hover,
.ha-consent__button--text:focus-visible {
  background: rgba(73, 84, 75, .045) !important;
  color: var(--ha-text) !important;
}

.ha-consent button:focus-visible,
.ha-consent a:focus-visible,
.ha-consent-inline-link:focus-visible,
.ha-consent-placeholder button:focus-visible {
  outline: 3px solid rgba(102, 119, 101, .34) !important;
  outline-offset: 3px;
}

.ha-consent__modal {
  background: var(--ha-surface);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 22px;
  box-shadow: var(--ha-shadow);
  left: 50%;
  max-height: min(820px, calc(100vh - 36px));
  max-width: 720px;
  overflow: hidden;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 30px));
  z-index: 2147483003;
  animation: ha-consent-modal-in .22s cubic-bezier(.2, .8, .2, 1) both;
}

.ha-consent__modal-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--ha-border);
  display: flex;
  justify-content: space-between;
  padding: 30px 30px 20px;
}

.ha-consent__modal-header h2 {
  margin-bottom: 0 !important;
}

.ha-consent__close {
  align-items: center;
  background: var(--ha-soft) !important;
  border: 1px solid var(--ha-border) !important;
  border-radius: 50% !important;
  color: var(--ha-muted) !important;
  cursor: pointer;
  display: inline-flex;
  font-size: 25px !important;
  font-weight: 300 !important;
  height: 40px;
  justify-content: center;
  line-height: 1 !important;
  margin: -4px -4px 0 12px;
  padding: 0 !important;
  transition: background-color .16s ease, color .16s ease;
  width: 40px;
}

.ha-consent__close:hover {
  background: #f0ede7 !important;
  color: var(--ha-text) !important;
}

.ha-consent__modal-body {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 30px 14px;
  scrollbar-color: rgba(85, 96, 87, .32) transparent;
  scrollbar-width: thin;
}

.ha-consent__modal-body > p {
  color: var(--ha-muted) !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  margin-bottom: 17px !important;
}

.ha-consent__service {
  background: rgba(247, 244, 238, .74);
  border: 1px solid var(--ha-border);
  border-radius: 14px;
  margin-bottom: 8px;
  padding: 14px 15px;
}

.ha-consent__service-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.ha-consent__service-head p {
  color: var(--ha-muted) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

.ha-consent__always {
  background: #e9eee7;
  border-radius: 999px;
  color: var(--ha-accent-dark);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 9px;
  white-space: nowrap;
}

.ha-consent__switch {
  display: inline-flex;
  flex: 0 0 auto;
  position: relative;
}

.ha-consent__switch input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.ha-consent__switch > span[aria-hidden="true"] {
  background: #dcdedb;
  border: 1px solid rgba(70, 79, 72, .16);
  border-radius: 999px;
  cursor: pointer;
  display: block;
  height: 26px;
  position: relative;
  transition: background-color .16s ease, border-color .16s ease;
  width: 46px;
}

.ha-consent__switch > span[aria-hidden="true"]::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(20, 26, 21, .2);
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform .17s cubic-bezier(.2, .8, .2, 1);
  width: 18px;
}

.ha-consent__switch input:checked + span {
  background: var(--ha-accent);
  border-color: var(--ha-accent);
}

.ha-consent__switch input:checked + span::after {
  transform: translateX(20px);
}

.ha-consent__switch input:focus-visible + span {
  outline: 3px solid rgba(102, 119, 101, .34);
  outline-offset: 3px;
}

.ha-consent__modal-footer {
  background: var(--ha-surface);
  border-top: 1px solid var(--ha-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 30px 22px;
}

.ha-consent__modal-footer .ha-consent__button {
  width: auto;
}

.ha-consent__reopen {
  align-items: center;
  background: rgba(51, 58, 52, .92) !important;
  border: 1px solid rgba(255, 255, 255, .22) !important;
  border-radius: 999px !important;
  bottom: 18px;
  box-shadow: 0 8px 24px rgba(27, 33, 28, .2) !important;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px !important;
  font-weight: 600 !important;
  left: 18px;
  line-height: 1 !important;
  min-height: 40px;
  padding: 10px 15px !important;
  position: fixed;
  transition: background-color .16s ease, transform .16s ease;
  z-index: 2147483000;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.ha-consent__reopen:hover {
  background: rgba(36, 43, 37, .96) !important;
  transform: translateY(-1px);
}

.ha-consent--right .ha-consent__reopen {
  left: auto;
  right: 18px;
}

.ha-consent__banner:not([hidden]) ~ .ha-consent__reopen,
.ha-consent__modal:not([hidden]) ~ .ha-consent__reopen {
  display: none;
}

.ha-consent__noscript {
  background: #fff4d6;
  border: 1px solid #ebcf85;
  bottom: 0;
  color: #302b20 !important;
  left: 0;
  margin: 0 !important;
  padding: 12px 18px;
  position: fixed;
  right: 0;
  text-align: center;
  z-index: 2147483004;
}

.ha-consent-inline-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ha-consent-blocked-frame,
.ha-consent-blocked-image {
  display: none !important;
}

.ha-consent-placeholder {
  align-items: center;
  background: var(--ha-soft);
  border: 1px dashed rgba(79, 95, 81, .28);
  border-radius: 16px;
  color: var(--ha-text);
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  min-height: 220px;
  padding: 28px 20px;
  text-align: center;
  width: 100%;
}

.ha-consent-placeholder strong {
  font-size: 16px;
}

.ha-consent-placeholder span {
  color: var(--ha-muted);
  font-size: 13px;
  max-width: 520px;
}

.ha-consent-placeholder__button {
  margin-top: 9px;
  max-width: 260px;
  width: auto;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

@keyframes ha-consent-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ha-consent-rise-in {
  from { opacity: 0; transform: translate(-50%, 14px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes ha-consent-modal-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 700px) {
  .ha-consent__banner {
    border-radius: 20px 20px 0 0;
    display: block;
    max-height: 92vh;
    overflow-y: auto;
    padding: 25px 20px 18px;
    width: calc(100% - 16px);
  }

  .ha-consent__banner-actions {
    display: grid;
    margin-top: 18px;
  }

  .ha-consent__modal {
    border-radius: 20px;
    width: calc(100vw - 20px);
  }

  .ha-consent__modal-header {
    padding: 26px 20px 16px;
  }

  .ha-consent__modal-body {
    max-height: calc(100vh - 245px);
    padding: 16px 20px 9px;
  }

  .ha-consent__service {
    padding: 12px;
  }

  .ha-consent__service-head {
    align-items: center;
  }

  .ha-consent__modal-footer {
    display: grid;
    padding: 13px 20px 18px;
  }

  .ha-consent__modal-footer .ha-consent__button {
    width: 100%;
  }

  .ha-consent__reopen {
    bottom: 12px;
    left: 12px;
  }

  .ha-consent--right .ha-consent__reopen {
    right: 12px;
  }

  .ha-consent-placeholder {
    min-height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ha-consent *,
  .ha-consent *::before,
  .ha-consent *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
