/* Angebotsliste (inc/angebot.php, assets/js/angebot.js): Zähler im Kopf, Karte über dem
   Kontaktformular, Bestätigung am unteren Rand. Farben wie Formular und Pillen. */

/* Kopf: kompakte Pille (Symbol und Zahl) vor „30 Tage testen“, auch mobil sichtbar.
   Die Menüleiste ist schon voll; das Wort „Angebot“ steht nur für Screenreader und im Tooltip. */
.ec-al-kopf {
  display: inline-flex;
  flex: none;
  gap: 0.3rem;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.3rem 0 0.55rem;
  border: 1.5px solid var(--wp--preset--color--akzent);
  border-radius: 999px;
  color: inherit;
  font-family: var(--wp--preset--font-family--ueberschrift);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.ec-al-kopf[hidden] {
  display: none;
}
.ec-al-kopf:is(:hover, :focus-visible) {
  background: rgb(233 168 37 / 0.14);
}
.ec-al-kopf > span:not(.ec-al-zahl) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ec-al-zahl {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--wp--preset--color--akzent);
  color: var(--wp--preset--color--tinte);
  font-size: 0.85rem;
}
/* Kleine Handys und Laptops um 1300 px: Die Kopfzeile ist dort schon ohne Pille fast voll,
   es bleibt nur die gelbe Zahl. Unter 360 px passt auch die nicht; Hinweis und Karte zeigen die Auswahl. */
@media (max-width: 400px) {
  .ec-al-kopf {
    padding: 0 0.25rem;
  }
  .ec-al-kopf svg {
    display: none;
  }
}
@media (min-width: 1181px) and (max-width: 1420px) {
  .ec-al-kopf {
    margin-left: -0.3rem;
    padding: 0;
    border-color: transparent;
  }
  .ec-al-kopf svg {
    display: none;
  }
  .ec-al-kopf:is(:hover, :focus-visible) {
    background: none;
  }
  .ec-al-kopf:is(:hover, :focus-visible) .ec-al-zahl {
    box-shadow: 0 0 0 2px var(--wp--preset--color--weiss);
  }
}
@media (max-width: 359px) {
  .ec-al-kopf {
    display: none !important;
  }
}
/* 1300–1340 px: Mit Pille fehlen ein paar Pixel. Dann gilt der engere Menüabstand,
   den das Theme (style.css) sonst nur von 1200 bis 1299 px setzt. */
@media (min-width: 1300px) and (max-width: 1340px) {
  .ec-header-innen:has(.ec-al-kopf:not([hidden])) .ec-hauptmenue .wp-block-navigation__container {
    gap: 1.75rem !important;
  }
}
/* 1200–1230 px: Direkt nach dem Umschalten aufs Desktop-Menü ist es noch enger. */
@media (min-width: 1200px) and (max-width: 1230px) {
  .ec-header-innen:has(.ec-al-kopf:not([hidden])) .ec-hauptmenue .wp-block-navigation__container {
    gap: 1.4rem !important;
  }
}

/* Karte im Formular */
.ec-al {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem 1rem;
  border-radius: 6px;
  background: #f4f2ed;
  box-shadow: inset 0 0 0 1px rgb(26 26 24 / 0.08);
  scroll-margin-top: 6rem;
}
.ec-al[hidden] {
  display: none;
}
.ec-al-kopfzeile {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}
.ec-al .ec-al-titel {
  margin: 0;
  color: var(--wp--preset--color--tinte);
  font-family: var(--wp--preset--font-family--ueberschrift);
  font-size: 1.15rem;
  font-weight: 700;
}
.ec-al button {
  font: inherit;
  cursor: pointer;
}
.ec-al-leeren,
.ec-al-notiz button {
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--wp--preset--color--gedaempft);
  font-size: var(--wp--preset--font-size--s) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ec-al-leeren:hover,
.ec-al-notiz button:hover {
  color: var(--wp--preset--color--tinte);
}
.ec-al-spalten,
.ec-al-pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem 7rem 2rem;
  gap: 0.75rem;
  align-items: center;
}
.ec-al-spalten {
  margin: 0.9rem 0 0.2rem;
  color: var(--wp--preset--color--gedaempft);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ec-al-spalten span:nth-child(3) {
  text-align: right;
}
.ec-al-liste {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ec-al-pos {
  padding: 0.75rem 0;
  border-top: 1px solid #dcd9d1;
}
.ec-al-name {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.ec-al-name strong {
  color: var(--wp--preset--color--tinte);
  font-family: var(--wp--preset--font-family--ueberschrift);
}
.ec-al-name span {
  color: var(--wp--preset--color--gedaempft);
  font-size: var(--wp--preset--font-size--s);
  line-height: 1.35;
}
.ec-al-menge {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  border: 1.5px solid #c9c5ba;
  border-radius: 999px;
  background: #fff;
}
.ec-al-menge button {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--wp--preset--color--tinte);
  font-size: 1.15rem;
  font-weight: 700;
}
.ec-al-menge button:hover:not(:disabled) {
  background: rgb(233 168 37 / 0.2);
}
.ec-al-menge button:disabled {
  color: #b5b1a6;
  cursor: default;
}
.ec-al-menge output {
  min-width: 1.6rem;
  font-weight: 700;
  text-align: center;
}
.ec-al-preis {
  display: grid;
  color: var(--wp--preset--color--tinte);
  font-weight: 700;
  text-align: right;
}
.ec-al-preis small {
  color: var(--wp--preset--color--gedaempft);
  font-size: 0.8rem;
  font-weight: 400;
}
.ec-al-offen {
  color: var(--wp--preset--color--gedaempft);
  font-weight: 400;
}
.ec-al-weg {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--wp--preset--color--gedaempft);
}
.ec-al-weg:hover {
  background: #e7e5df;
  color: #b3261e;
}
.ec-al :is(button, output):focus-visible {
  outline: 3px solid var(--wp--preset--color--tinte);
  outline-offset: 2px;
}
.ec-al-frage {
  margin: 0.25rem 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  background: rgb(233 168 37 / 0.16);
  box-shadow: inset 3px 0 0 var(--wp--preset--color--akzent);
}
.ec-al-frage p {
  margin: 0 0 0.6rem;
  color: var(--wp--preset--color--tinte);
}
.ec-al-frage div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ec-al-frage button {
  padding: 0.4rem 1rem;
  border: 1.5px solid #c9c5ba;
  border-radius: 999px;
  background: #fff;
  color: var(--wp--preset--color--tinte);
  font-weight: 600;
}
.ec-al-frage button:hover {
  border-color: var(--wp--preset--color--akzent);
}
.ec-al-notiz {
  margin: 0.25rem 0 0.75rem;
  color: var(--wp--preset--color--gedaempft);
  font-size: var(--wp--preset--font-size--s);
}
.ec-al-summe,
.ec-al-pflege {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-right: 2.75rem;
}
.ec-al-summe {
  padding-top: 0.75rem;
  border-top: 1.5px solid var(--wp--preset--color--tinte);
  color: var(--wp--preset--color--tinte);
  font-family: var(--wp--preset--font-family--ueberschrift);
  font-weight: 700;
}
.ec-al-summe strong {
  font-size: 1.2rem;
}
.ec-al-pflege {
  margin-top: 0.15rem;
  color: var(--wp--preset--color--gedaempft);
  font-size: var(--wp--preset--font-size--s);
}
.ec-al-rabatt {
  margin: 0.6rem 0 0;
  color: #8a5a00;
  font-size: var(--wp--preset--font-size--s);
  font-weight: 600;
}
.ec-al-hinweis {
  margin: 0.6rem 0 0;
  color: var(--wp--preset--color--gedaempft);
  font-size: var(--wp--preset--font-size--s);
}
@media (max-width: 600px) {
  .ec-al {
    padding: 1rem;
  }
  .ec-al-spalten {
    display: none;
  }
  .ec-al-pos {
    grid-template-columns: minmax(0, 1fr) auto 2rem;
    grid-template-areas: "name name weg" "menge preis preis";
    row-gap: 0.6rem;
  }
  .ec-al-name { grid-area: name; }
  .ec-al-menge { grid-area: menge; }
  .ec-al-preis { grid-area: preis; }
  .ec-al-weg { grid-area: weg; align-self: start; }
  .ec-al-summe,
  .ec-al-pflege {
    padding-right: 0;
  }
}

/* Buttons, deren Produkt schon in der Liste ist */
a.ist-im-angebot {
  box-shadow: inset 0 0 0 2px var(--wp--preset--color--akzent);
}

/* Bestätigung am unteren Rand */
.ec-al-toast {
  position: fixed;
  z-index: 1000;
  right: 1rem;
  bottom: 1.25rem;
  left: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  width: fit-content;
  max-width: 34rem;
  margin-inline: auto;
  padding: 0.7rem 0.6rem 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--wp--preset--color--tinte);
  color: #fff;
  box-shadow: 0 10px 30px rgb(26 26 24 / 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.ec-al-toast.ist-offen {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.ec-al-toast span {
  font-size: var(--wp--preset--font-size--s);
  line-height: 1.35;
}
.ec-al-toast a {
  flex: none;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--wp--preset--color--akzent);
  color: var(--wp--preset--color--tinte);
  font-family: var(--wp--preset--font-family--ueberschrift);
  font-weight: 700;
  text-decoration: none;
}
.ec-al-toast button {
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #fff;
  cursor: pointer;
}
@media (max-width: 600px) {
  .ec-al-toast {
    gap: 0.6rem;
    border-radius: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ec-al-toast {
    transition: none;
  }
}
