/*
 * Planvergleich der Funktionsseiten (AI Alt Text, Barrierefreiheitstest).
 * 1:1 aus dem Customizer-CSS der Live-Site übernommen (Block „PLANVERGLEICH“),
 * nur die Tastaturfokus-Regel entfernt (übernimmt EZZE WCAG Pro).
 * Markup: partials/plan-compare-*.php
 */

/*================PLANVERGLEICH=============*/

/*
 * Shared plan comparison styles for the Accessibility Test and AI Alt Text.
 *
 * Expected markup:
 * - .ezze-plan-section
 * - .ezze-plan-grid for the wide comparison table
 * - .ezze-plan-mobile for the responsive plan cards
 *
 * Keep every selector scoped to .ezze-plan-section. The public pricing carousel
 * also uses .ezze-plan-card and must not inherit these comparison styles.
 */

.ezze-plan-section {
  --ezze-plan-accent: #0062d2;
  --ezze-plan-accent-hover: #0056ba;
  --ezze-plan-accent-soft: #edf6ff;
  --ezze-plan-ink: var(--e-global-color-text, #151044);
  --ezze-plan-muted: var(--color-text, #5d5a7d);
  --ezze-plan-border: #dce8f5;
  --ezze-plan-surface: #ffffff;
  --ezze-plan-surface-soft: #f8fbff;
  width: 100%;
  color: var(--ezze-plan-ink);
  font-family: inherit;
}

.ezze-plan-section *,
.ezze-plan-section *::before,
.ezze-plan-section *::after {
  box-sizing: border-box;
}

.ezze-plan-section .ezze-plan-card {
  width: 100%;
  padding: 0;
  border: 1px solid var(--ezze-plan-border);
  border-radius: 24px;
  background: var(--ezze-plan-surface);
  box-shadow: 0 18px 44px rgba(21, 16, 68, 0.08);
  overflow: hidden;
}

/* Wide comparison table */

.ezze-plan-section .ezze-plan-grid {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.ezze-plan-section .ezze-plan-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(5, minmax(116px, 1fr));
  min-width: 940px;
  border-bottom: 1px solid var(--ezze-plan-border);
}

.ezze-plan-section .ezze-plan-row > [role="cell"],
.ezze-plan-section .ezze-plan-row > [role="columnheader"] {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 17px 16px;
  border-inline-start: 1px solid var(--ezze-plan-border);
  color: var(--ezze-plan-muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.ezze-plan-section .ezze-plan-row > [role="cell"]:first-child,
.ezze-plan-section .ezze-plan-row > [role="columnheader"]:first-child {
  border-inline-start: 0;
}

.ezze-plan-section .ezze-plan-row > [role="cell"]:not(:first-child),
.ezze-plan-section .ezze-plan-row > [role="columnheader"]:not(:first-child) {
  justify-content: center;
  text-align: center;
}

.ezze-plan-section .ezze-plan-row:last-of-type {
  border-bottom: 0;
}

.ezze-plan-section .ezze-plan-head {
  background: var(--ezze-plan-surface-soft);
}

.ezze-plan-section .ezze-plan-head > [role="columnheader"] {
  min-height: 64px;
  color: var(--ezze-plan-ink);
  font-size: 15px;
  font-weight: 800;
}

.ezze-plan-section .ezze-plan-head > [role="columnheader"]:first-child {
  color: var(--ezze-plan-muted);
}

.ezze-plan-section .ezze-plan-feature {
  justify-content: space-between;
  gap: 10px;
  color: var(--ezze-plan-ink) !important;
  font-weight: 700;
  text-align: start !important;
}

.ezze-plan-section .ezze-plan-feature > span:first-child {
  min-width: 0;
}

.ezze-plan-section .ezze-plan-highlight {
  border-inline: 1px solid rgba(0, 98, 210, 0.28) !important;
  background: var(--ezze-plan-accent-soft);
  color: var(--ezze-plan-ink) !important;
  font-weight: 750;
}

.ezze-plan-section .ezze-plan-head .ezze-plan-highlight {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px;
  min-height: 84px;
  padding-block: 10px;
  background: var(--ezze-plan-accent);
  color: #ffffff !important;
}

.ezze-plan-section .ezze-plan-recommendation-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.ezze-plan-section .ezze-plan-head .ezze-plan-highlight > span:last-child {
  display: block;
  color: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

/* Keyboard- and pointer-accessible explanatory tooltips */

.ezze-plan-section .ezze-info-tooltip {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  margin: -6px;
  padding: 0;
  aspect-ratio: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ezze-plan-accent);
  font: inherit;
  cursor: help;
}

.ezze-plan-section .ezze-info-tooltip:focus {
  outline: none;
}

.ezze-plan-section .ezze-info-tooltip:focus-visible {
  outline: 2px solid var(--ezze-plan-accent);
  outline-offset: -2px;
}

.ezze-plan-section .ezze-info-icon-svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.ezze-plan-section .ezze-tooltip-text {
  position: absolute;
  inset-inline-start: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  width: min(290px, calc(100vw - 32px));
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #151044;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(21, 16, 68, 0.24);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: start;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ezze-plan-section .ezze-tooltip-text::after {
  position: absolute;
  top: 100%;
  inset-inline-start: 50%;
  width: 0;
  height: 0;
  border: 7px solid transparent;
  border-top-color: #151044;
  content: "";
  transform: translateX(-50%);
}

.ezze-plan-section .ezze-info-tooltip:hover .ezze-tooltip-text,
.ezze-plan-section .ezze-info-tooltip:focus .ezze-tooltip-text,
.ezze-plan-section .ezze-info-tooltip:focus-within .ezze-tooltip-text,
.ezze-plan-section .ezze-info-tooltip.is-open .ezze-tooltip-text {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Bridge across the gap so the pointer can move onto the tooltip (WCAG 1.4.13). */
.ezze-plan-section .ezze-tooltip-text::before {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  height: 12px;
  content: "";
}

/* Escape dismisses until the pointer leaves or focus moves (assets/js/plan-compare.js). */
.ezze-plan-section .ezze-info-tooltip.is-dismissed .ezze-tooltip-text {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Notes below the comparison */

.ezze-plan-section .ezze-plan-note,
.ezze-plan-section .ezze-plan-mobile-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--ezze-plan-border);
  background: var(--ezze-plan-surface-soft);
  color: var(--ezze-plan-muted);
  font-size: 13px;
  line-height: 1.55;
}

.ezze-plan-section .ezze-plan-note {
  min-width: 940px;
}

.ezze-plan-section .ezze-plan-note-icon {
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 98, 210, 0.32);
  border-radius: 999px;
  background: var(--ezze-plan-accent-soft);
  color: var(--ezze-plan-accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

/* Dedicated responsive cards; hidden while the full table fits. */

.ezze-plan-section .ezze-plan-mobile {
  display: none;
}

.ezze-plan-section .ezze-plan-mobile-card {
  padding: 22px;
  border: 1px solid var(--ezze-plan-border);
  border-radius: 20px;
  background: var(--ezze-plan-surface);
}

.ezze-plan-section .ezze-plan-mobile-card h3 {
  margin: 0 0 10px;
  color: var(--ezze-plan-ink);
  font-size: 24px;
  line-height: 1.2;
}

.ezze-plan-section .ezze-plan-mobile-card p {
  margin: 0 0 16px;
  color: var(--ezze-plan-muted);
  font-size: 15px;
  line-height: 1.5;
}

.ezze-plan-section .ezze-plan-mobile-card p strong {
  color: var(--ezze-plan-accent);
}

.ezze-plan-section .ezze-plan-mobile-card ul {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--ezze-plan-muted);
}

.ezze-plan-section .ezze-plan-mobile-card li {
  margin-block: 7px;
  padding-inline-start: 3px;
  font-size: 14px;
  line-height: 1.5;
}

.ezze-plan-section .ezze-plan-mobile-card-recommended {
  border: 2px solid var(--ezze-plan-accent);
  background: var(--ezze-plan-accent-soft);
}

.ezze-plan-section .ezze-plan-mobile-recommendation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin: 0 0 12px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--ezze-plan-accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.ezze-plan-section .ezze-plan-mobile-note {
  grid-column: 1 / -1;
  border: 1px solid var(--ezze-plan-border);
  border-radius: 16px;
}

/* Preise und Buttons (Patrick, 2026-10-11): Preis im Tabellenkopf, Button-Zeile unter der
 * Tabelle, Mobil-Karten mit Preis, Häkchen-/Minus-Liste, hervorgehobener Kernzeile und Button.
 * Daten aus data/pricing.php; keine zusätzlichen Schatten.
 * Präfix .ezze-site: das alte PLANVERGLEICH-CSS im Customizer (wp-custom-css) lädt danach
 * und würde gleich spezifische Regeln (Listenabstände, ul-Margin) sonst überschreiben. */

.ezze-site .ezze-plan-section .ezze-plan-head > [role="columnheader"]:not(:first-child) {
  flex-direction: column;
  gap: 4px;
}

.ezze-site .ezze-plan-section .ezze-plan-head-name {
  display: block;
  color: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.ezze-site .ezze-plan-section .ezze-plan-head-price {
  display: block;
  color: var(--ezze-plan-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-highlight .ezze-plan-head-price,
.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-highlight .ezze-plan-head-tax {
  /* Auf dem Akzentblau nur Weiß (5,7:1); dunkle Schrift oder Weiß mit Transparenz fällt unter 4,5:1. */
  color: #ffffff;
}

/* Tabellenkopf (Patrick, 2026-10-19): jede Spalte gleich aufgebaut – Badge-Zeile (Free, Plus, sonst
 * Platzhalter), Name, Preis groß mit Zeitraum, darunter ein kurzer Steuerhinweis („inkl. 19 % USt.“).
 * Die ausführliche Aufschlüsselung bleibt in den Preis-Cards und den Mobil-Karten. */
.ezze-site .ezze-plan-section .ezze-plan-head > [role="columnheader"]:not(:first-child) {
  justify-content: flex-start !important;
  gap: 4px;
  padding-block: 14px 16px;
}

.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-free-label,
.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-recommendation-label,
.ezze-site .ezze-plan-section .ezze-plan-head-badge-space {
  box-sizing: border-box;
  height: 22px;
  min-height: 0;
  margin-bottom: 2px;
  padding-block: 0;
  font-size: 11px;
}

.ezze-site .ezze-plan-section .ezze-plan-head-badge-space {
  display: block;
}

.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-head-price,
.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-highlight > .ezze-plan-head-price {
  color: var(--ezze-plan-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.ezze-site .ezze-plan-section .ezze-plan-head-price [data-ezze-price-value] {
  font-size: 18px;
  font-weight: 800;
}

.ezze-site .ezze-plan-section .ezze-plan-head-price [data-ezze-price-period] {
  color: var(--ezze-plan-muted);
  white-space: nowrap;
}

.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-head-tax {
  margin-top: 2px;
  color: var(--ezze-plan-muted);
  font-size: 12px;
  font-weight: 600;
  text-wrap: balance;
}

.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-highlight .ezze-plan-head-price,
.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-highlight [data-ezze-price-period],
.ezze-site .ezze-plan-section .ezze-plan-head .ezze-plan-highlight .ezze-plan-head-tax {
  color: #ffffff;
}

.ezze-site .ezze-plan-section .ezze-plan-cta-row {
  border-bottom: 0;
}

.ezze-site .ezze-plan-section .ezze-plan-cta-row > [role="cell"] {
  padding: 18px 12px;
}

.ezze-site .ezze-plan-section .ezze-plan-cta-row .ezze-btn {
  width: 100%;
  justify-content: center;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card {
  display: flex;
  flex-direction: column;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card .ezze-plan-mobile-head h3 {
  margin: 0;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-head .ezze-plan-mobile-recommendation {
  margin: 0;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-label {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #d4edfa;
  color: var(--ezze-plan-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card .ezze-plan-mobile-price {
  margin: 14px 0 2px;
  color: var(--ezze-plan-muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card .ezze-plan-mobile-price strong {
  color: var(--ezze-plan-ink);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card .ezze-plan-mobile-billing {
  margin: 0 0 18px;
  font-size: 13px;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card ul {
  display: grid;
  gap: 6px;
  margin: 0 0 30px;
  padding: 18px 0 0;
  border-top: 1px solid var(--ezze-plan-border);
  list-style: none;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
  color: var(--ezze-plan-muted);
  font-size: 15px;
  line-height: 1.45;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card li .ezze-icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--ezze-plan-accent);
  stroke-width: 2.4;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card li.is-key {
  color: var(--ezze-plan-ink);
  font-weight: 800;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card li.is-off {
  color: #6b6888;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card li.is-off .ezze-icon {
  color: #9a97b3;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-card .ezze-btn {
  width: 100%;
  margin-top: auto;
  justify-content: center;
}

.ezze-site .ezze-plan-section .ezze-plan-free-label,
.ezze-site .ezze-plan-section .ezze-plan-mobile-label--free {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #e3f5e9;
  color: #146c34;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

/* Free-Badge (Patrick, 2026-10-11): grün, damit der kostenlose Einstieg auffällt. */
.ezze-site .ezze-plan-section .ezze-plan-free-label {
  min-height: 20px;
  padding: 4px 9px;
  font-size: 10px;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-label--free .ezze-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

/* Umschalter über dem Planvergleich (Logik: plans.js): Desktop-Tabelle Währung links, Abrechnung rechts. */
.ezze-site .ezze-plan-section .ezze-plan-switches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 24px;
}

.ezze-site .ezze-plan-section .ezze-plan-currency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ezze-site .ezze-plan-section .ezze-plan-currency .ezze-info-tooltip {
  margin: 0;
}

.ezze-site .ezze-plan-section .ezze-plan-mobile-prices .ezze-plan-saving-note {
  margin: -12px 0 18px;
}

.ezze-site .ezze-plan-section.is-billing-monthly [data-ezze-saving-note]:not([hidden]) {
  cursor: pointer;
}

.ezze-site .ezze-plan-section.is-billing-monthly [data-ezze-saving-note]:not([hidden]):hover,
.ezze-site .ezze-plan-section.is-billing-monthly [data-ezze-saving-note]:not([hidden]):focus-visible {
  color: #0056ba;
  text-decoration: underline;
}

/* Kompakte Preisanzeige über dem Planvergleich (partials/plans-toolbar.php, Styles der Bedienelemente in plans.css). */
.ezze-site .ezze-plan-section--settings .ezze-carousel-toolbar {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  margin: 0 0 24px;
  padding: 0;
}

@media (max-width: 900px) {
  .ezze-site .ezze-plan-section--settings .ezze-carousel-toolbar {
    justify-content: center;
  }
}

/* Mobile Karten: zentriert, Abrechnung zuerst wie bisher. */
@media (max-width: 900px) {
  .ezze-site .ezze-plan-section .ezze-plan-switches {
    justify-content: center;
  }

  .ezze-site .ezze-plan-section .ezze-plan-switches .ezze-billing-switch {
    order: -1;
  }
}

@media (max-width: 400px) {
  .ezze-site .ezze-plan-section .ezze-billing-switch {
    --ezze-switch-width: 100%;
  }
}

@media (max-width: 900px) {
  .ezze-plan-section .ezze-plan-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .ezze-plan-section .ezze-plan-grid {
    display: none;
  }

  .ezze-plan-section .ezze-plan-mobile {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 620px) {
  .ezze-plan-section .ezze-plan-mobile {
    grid-template-columns: minmax(0, 1fr);
  }

  .ezze-plan-section .ezze-plan-mobile-card {
    padding: 20px;
    border-radius: 18px;
  }
}

@media (forced-colors: active) {
  .ezze-plan-section .ezze-plan-highlight,
  .ezze-plan-section .ezze-plan-mobile-card-recommended,
  .ezze-plan-section .ezze-plan-note-icon {
    border-color: Highlight !important;
  }

  .ezze-plan-section .ezze-plan-head .ezze-plan-highlight {
    background: Highlight;
    color: HighlightText !important;
  }

  .ezze-plan-section .ezze-tooltip-text {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}
