/* ============================================================
   Innuvis — Hinweis zur Abstimmung (Instandhaltungspreis 2026)
   ------------------------------------------------------------
   Gehoert zu assets/in-umfrage.js. Alle Klassen beginnen mit
   in-um- und kollidieren daher nicht mit in-base.css oder der
   Consent-Ebene (in-cs-).

   Befristet: die Abstimmung endet am 14.10.2026, danach blendet
   das Skript nichts mehr ein. CSS und Markup koennen dann
   ersatzlos entfernt werden.

   Farben referenzieren die Tokens aus in-base.css ueber var(...)
   mit hartkodiertem Fallback — wie in-consent.css, damit die
   Datei auch ohne in-base.css traegt.

   z-index 250: ueber Kopfzeile (100), Untermenue (120) und der
   Handlungsleiste auf /wechsel/ (200), aber UNTER der
   Einwilligungsebene (300). Die behaelt Vorrang; das Skript
   zeigt den Hinweis ohnehin erst nach der Einwilligungsfrage.

   Kein Scroll-Sperre am body: 100vw-Effekte und verschwindende
   Scrollleisten erzeugen den seitlichen Schub, den wechsel/
   index.html ausdruecklich vermeidet.
   ============================================================ */

.in-um-ebene {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: rgba(10, 1, 24, .74);
  opacity: 0;
  transition: opacity .25s cubic-bezier(.16, 1, .3, 1);
}
.in-um-ebene.is-visible { opacity: 1; }

.in-um-karte {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--in-surface, #0F0520);
  border: 1px solid var(--in-border, rgba(255, 255, 255, .10));
  border-radius: 12px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .55);
  color: var(--in-text, #FFFFFF);
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  transform: translateY(10px);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
.in-um-ebene.is-visible .in-um-karte { transform: none; }
.in-um-karte:focus { outline: none; }

/* Das Bild ist zugleich die groesste Klickflaeche ("Jetzt abstimmen!"
   steht darauf) und liegt deshalb in einem echten Link. max-height
   haelt die Karte auf flachen Fenstern (Querformat am Telefon) im
   Bild; der Grund traegt die Farbe der Grafik, damit bei contain
   kein dunkler Rand entsteht. */
.in-um-bildlink {
  display: block;
  line-height: 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.in-um-bild {
  display: block;
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: contain;
  background: #EC9417;
  cursor: pointer;
}

.in-um-text {
  margin: 0;
  padding: 20px 22px 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--in-text-dim, #9B96B0);
}
.in-um-text strong {
  color: var(--in-text, #FFFFFF);
  font-weight: 600;
}

.in-um-aktionen {
  display: flex;
  gap: 10px;
  padding: 18px 22px 22px;
}

.in-um-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 48px;
  padding: 13px 20px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
/* Hover verdunkelt statt aufzuhellen — weiss auf --in-blue-bright
   waere WCAG-AA-Fail, auf --in-blue-deep sind es ~5,4:1. */
.in-um-btn-ja {
  background: var(--in-blue, #2D7ABE);
  color: #FFFFFF;
}
.in-um-btn-ja:hover { background: var(--in-blue-deep, #25659E); }

.in-um-btn-spaeter {
  background: transparent;
  color: var(--in-text, #FFFFFF);
  border-color: rgba(255, 255, 255, .35);
}
.in-um-btn-spaeter:hover { border-color: var(--in-blue, #2D7ABE); }

.in-um-btn:focus-visible,
.in-um-bildlink:focus-visible,
.in-um-zu:focus-visible {
  outline: 2px solid var(--in-blue-bright, #5EA8E8);
  outline-offset: 2px;
}

/* Schliesskreuz nach dem Muster von .in-film-start-kreis: dunkler
   Kreis mit hellem Rand, damit es auf der orangen Grafik traegt. */
.in-um-zu {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(10, 1, 24, .66);
  border: 1px solid rgba(255, 255, 255, .55);
  color: #FFFFFF;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
}
.in-um-zu:hover { background: rgba(10, 1, 24, .88); }

@media (max-width: 480px) {
  .in-um-ebene { padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
  .in-um-aktionen { flex-direction: column; padding: 16px 18px 18px; }
  .in-um-text { padding: 18px 18px 0; }
  .in-um-bild { max-height: 44vh; }
}

/* Flaches Fenster (Telefon im Querformat, kleine Notebooks): Bild und
   Text nebeneinander statt untereinander — sonst rutschen die Knoepfe
   aus dem Bild und man muesste innerhalb der Karte scrollen. */
@media (max-height: 560px) and (min-width: 620px) {
  /* Feste Kartenhoehe, damit das Bild danebenstehen kann, ohne mit
     seiner natuerlichen Groesse (880 px) die Karte aufzublasen. */
  .in-um-karte {
    display: flex;
    align-items: stretch;
    max-width: 660px;
    height: min(92vh, 400px);
    overflow: hidden;
  }
  .in-um-bildlink {
    flex: 0 0 46%;
    border-radius: 12px 0 0 12px;
  }
  .in-um-bild {
    height: 100%;
    max-height: none;
    /* Angeschnitten wird rechts der Pokal, nie die Schrift links. */
    object-fit: cover;
    object-position: left center;
  }
  .in-um-inhalt {
    flex: 1 1 54%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
  }
  .in-um-text { padding: 20px 22px 0; }
  /* Untereinander: in der schmalen Spalte braeche "Jetzt abstimmen"
     sonst in zwei Zeilen um. */
  .in-um-aktionen { flex-direction: column; padding: 16px 22px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .in-um-ebene,
  .in-um-karte { transition: none !important; }
  .in-um-karte { transform: none !important; }
}
