/* ============================================================
   App installieren (28.10.2026) – Knöpfe, Anleitung, Meldung; Verhalten in js/app.js
   eigenständig (Login und Portal haben unterschiedliche Variablen), hell über html[data-thema="hell"]
   20.11.2026: Farben von Grün auf Supporter24-Orange wie das neue App-Symbol (24 in der Sprechblase)
   ============================================================ */
[data-app-installieren][hidden], [data-app-huelle][hidden] { display: none !important; }

/* Portal, Seitenmenü unten: rund wie Sonne/Mond, ausgeklappt mit Text */
.sb-app { display: flex; align-items: center; justify-content: center; gap: 10px; width: 38px; height: 38px; padding: 0; border-radius: 12px; border: 1px solid rgba(226, 119, 63, .45); background: rgba(226, 119, 63, .12); color: #fde6d8; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.sb-app img { width: 24px; height: 24px; border-radius: 7px; flex: none; }
.sb-app span { display: none; white-space: nowrap; }
.sb-app:hover, .sb-app:focus-visible { background: rgba(226, 119, 63, .22); border-color: #e2773f; outline: none; }
.sb-app:active { transform: scale(.96); }
body.sb-expanded .sb-app { width: 100%; justify-content: flex-start; padding: 0 12px 0 6px; }
body.sb-expanded .sb-app span { display: inline; }

/* Login-Seite: kleine Pille oben rechts neben Hell/Dunkel */
.app-pille { position: fixed; top: 16px; right: 64px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid rgba(226, 119, 63, .45); background: rgba(24, 19, 16, .72); color: #fde6d8; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: background .15s, border-color .15s; }
.app-pille img { width: 26px; height: 26px; border-radius: 8px; }
.app-pille:hover, .app-pille:focus-visible { border-color: #e2773f; background: rgba(36, 27, 22, .85); outline: none; }

/* Supporter (Kunden-Titelleiste) */
.sp-app { display: inline-flex; align-items: center; gap: 7px; }
.sp-app img { width: 20px; height: 20px; border-radius: 6px; }

/* Anleitung */
.app-dialog { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0); transition: background .2s; }
.app-dialog.is-offen { background: rgba(0, 0, 0, .55); }
.app-dialog-karte { position: relative; width: min(400px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px 24px 22px; border-radius: 22px; background: #262626; color: #fff; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 24px 70px rgba(0, 0, 0, .5); text-align: center; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; transform: translateY(14px) scale(.98); opacity: 0; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.app-dialog.is-offen .app-dialog-karte { transform: none; opacity: 1; }
.app-dialog-icon { width: 64px; height: 64px; border-radius: 17px; box-shadow: 0 8px 24px rgba(164, 62, 11, .35); }
.app-dialog h2 { margin: 14px 0 4px; font-size: 20px; font-weight: 700; color: inherit; }
.app-dialog-sub { margin: 0 0 18px; color: #a3a3a3; font-size: 14px; line-height: 1.45; }
.app-schritte { display: grid; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; text-align: left; }
.app-schritte li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: #2e2e2e; font-size: 14.5px; line-height: 1.4; }
.app-schritte b { font-weight: 700; }
.app-schritt-ico { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: rgba(226, 119, 63, .16); color: #f0a477; }
.app-schritt-ico svg { width: 20px; height: 20px; fill: currentColor; }
.app-schritt-nr { font-size: 15px; }
.app-dialog-ok { width: 100%; height: 44px; border: 0; border-radius: 12px; background: #e2773f; color: #161616; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.app-dialog-ok:hover { background: #ec8b57; }
.app-dialog-ok:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.app-dialog-zu { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: #a3a3a3; font-size: 24px; line-height: 1; cursor: pointer; }
.app-dialog-zu:hover, .app-dialog-zu:focus-visible { background: #363636; color: #fff; outline: none; }

/* Meldung nach dem Installieren */
.app-meldung { position: fixed; left: 50%; bottom: 22px; z-index: 3100; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px; background: #2e2e2e; color: #fff; border: 1px solid rgba(226, 119, 63, .5); box-shadow: 0 14px 40px rgba(0, 0, 0, .4); font: 600 14px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif; transform: translate(-50%, 20px); opacity: 0; transition: transform .25s, opacity .25s; }
.app-meldung.is-offen { transform: translate(-50%, 0); opacity: 1; }

/* Hell */
html[data-thema="hell"] .sb-app { color: #8a340a; background: rgba(226, 119, 63, .14); border-color: rgba(164, 62, 11, .4); }
html[data-thema="hell"] .app-pille { color: #8a340a; background: rgba(255, 255, 255, .85); border-color: rgba(164, 62, 11, .4); }
html[data-thema="hell"] .app-dialog-karte { background: #fff; color: #1f1f17; border-color: rgba(40, 40, 20, .12); }
html[data-thema="hell"] .app-dialog-sub { color: #6b6b5f; }
html[data-thema="hell"] .app-schritte li { background: #f3f2ea; }
html[data-thema="hell"] .app-schritt-ico { color: #a43e0b; }
html[data-thema="hell"] .app-dialog-zu:hover { background: #ebeae2; color: #1f1f17; }
html[data-thema="hell"] .app-meldung { background: #fff; color: #1f1f17; }

/* Login: fester Bereich «Supporter24 als App» mit einem Knopf, Gerät wird erkannt (30.10.2026) */
[data-app-wahl][hidden] { display: none !important; }
.app-wahl { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(226, 119, 63, .35); background: rgba(226, 119, 63, .06); }
.app-wahl-kopf { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-wahl-kopf img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.app-wahl-kopf span { display: flex; flex-direction: column; line-height: 1.3; }
.app-wahl-kopf b { font-weight: 700; }
.app-wahl-kopf small { font-size: 12.5px; opacity: .7; }
.app-wahl-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid rgba(226, 119, 63, .45); background: #e2773f; color: #161616; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.app-wahl-knopf svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.app-wahl-knopf:hover, .app-wahl-knopf:focus-visible { background: #ec8b57; outline: none; }
.app-wahl-knopf:active { transform: scale(.98); }
.app-dialog-hinweis { margin: -8px 0 18px; font-size: 12.5px; line-height: 1.45; color: #a3a3a3; text-align: left; }
html[data-thema="hell"] .app-wahl { background: rgba(226, 119, 63, .08); border-color: rgba(164, 62, 11, .35); }
html[data-thema="hell"] .app-dialog-hinweis { color: #6b6b5f; }

@media (max-width: 760px) { .app-pille { top: 14px; right: 60px; padding-right: 12px; } }
@media (max-width: 380px) { .app-wahl-knopf { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .app-dialog, .app-dialog-karte, .app-meldung { transition: none; } }
