/* Gruppen-Events: Tab „Freunde“ (Entwurf freunde-aufbau.html Variante B) und Live-Seite (freunde.html rechts) */
.bottomnav button svg { width: 25px; height: 25px; }

.events { padding: 20px 0 40px; }
.ev-kopf-icons { display: flex; gap: 6px; }
.ev-kopf-icons button { width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--blue);
  display: flex; align-items: center; justify-content: center; }
.ev-kopf-icons button svg { width: 22px; height: 22px; }
.ev-kopf-icons button:active { opacity: .6; }

.ev-av { border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff;
  font-weight: 600; object-fit: cover; }
.ev-av-rand { border: 2px solid var(--field); }

/* Laufendes Event als Karte */
.ev-karte { display: block; width: calc(100% - 40px); margin: 0 20px var(--gap); border-radius: 20px; height: 112px; position: relative;
  overflow: hidden; text-align: left; }
.ev-karte:active { opacity: .85; }
.ev-karte .t { position: absolute; left: 16px; right: 16px; bottom: 30px; font-size: 19px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-karte .s { position: absolute; left: 16px; right: 16px; bottom: 12px; font-size: 12.5px; color: rgba(255, 255, 255, .85);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-livepunkt { position: absolute; left: 14px; top: 12px; background: rgba(0, 0, 0, .35); color: #fff; font-size: 11px;
  font-weight: 700; padding: 4px 9px; border-radius: 11px; display: flex; align-items: center; gap: 6px; }
.ev-livepunkt i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); animation: ev-puls 1.6s ease-in-out infinite; }
@keyframes ev-puls { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ev-livepunkt i { animation: none; } }
.ev-leute { position: absolute; right: 14px; top: 12px; display: flex; padding-left: 8px; }
.ev-leute .ev-av { border: 2px solid rgba(255, 255, 255, .35); margin-left: -8px; font-size: 11px; }
.ev-leute .ev-rest { background: #44464A; }

.ev-neu { margin: 0 20px; height: 50px; border-radius: 14px; background: var(--card); display: flex; align-items: center;
  justify-content: center; gap: 8px; color: var(--blue); font-size: 16px; font-weight: 600; width: calc(100% - 40px); }
.ev-neu:active { opacity: .6; }
.ev-leer { margin-top: var(--gap); }

.ev-sek { font-size: 13px; color: var(--text2); padding: 16px 20px 8px; text-transform: uppercase; letter-spacing: .3px; }
.ev-liste { overflow: hidden; }
.ev-zeile { display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; }
.ev-zeile + .ev-zeile { border-top: .7px solid var(--sep); }
.ev-zeile:active { background: rgba(255, 255, 255, .05); }
.ev-datum { width: 44px; height: 44px; border-radius: 10px; flex: none; background: var(--field); display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text2); font-size: 11px; font-weight: 700; line-height: 1.1; }
.ev-datum b { font-size: 16px; color: var(--text); }
.ev-ztext { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-ztext .zt { font-size: 15px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-ztext .zs { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.ev-zeile .chev { color: var(--text2); font-size: 16px; }

/* Kalender: Spalten = Wochen, Zeilen = Mo–So, zwei Blöcke */
.ev-kal { padding: 0 20px; display: flex; flex-direction: column; gap: 14px; }
.ev-kal-grid { display: grid; grid-template-rows: 14px; grid-auto-rows: auto; gap: 2.5px; }
.ev-kal-wt { font-size: 9px; color: var(--text2); display: flex; align-items: center; }
.ev-kal-monat { font-size: 9.5px; font-weight: 700; color: var(--text2); white-space: nowrap; overflow: visible; align-self: end; }
.ev-zelle { aspect-ratio: 1; border-radius: 3px; background: #1a1a1c; display: block; width: 100%; min-width: 0; padding: 0; }
.ev-zelle.zukunft { opacity: .35; }
.ev-zelle.heute { box-shadow: 0 0 0 1px var(--blue); }
.ev-zelle.ev { opacity: 1; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); cursor: pointer; background-size: cover; }
.ev-zelle.ev.heute { box-shadow: 0 0 0 1.5px #fff; }
.ev-zelle.aus { visibility: hidden; }

/* Neues Event */
.ev-form { padding-top: 0; }
.ev-form .f-label:first-child { padding-top: 4px; }
.ev-form .picker { background: var(--field); border-radius: 10px; }
.ev-form .knopf { padding-top: 24px; }

/* Live-Seite */
.ev-seite { padding: 12px 0 110px; }
.ev-teilen { color: var(--ios-blue) !important; }
.ev-kopf { display: block; margin: 0 20px; border-radius: 20px; overflow: hidden; height: 128px; position: relative; }
.ev-kopf .t { position: absolute; left: 18px; right: 18px; bottom: 34px; font-size: 22px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-kopf .s { position: absolute; left: 18px; right: 18px; bottom: 14px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.ev-kopf .ev-livepunkt { left: auto; right: 14px; top: 14px; font-size: 12px; padding: 5px 10px; border-radius: 12px; }
.ev-kopf .ev-livepunkt i { width: 8px; height: 8px; }
.ev-kopf.pressed { opacity: .85; }
.ev-kopf.klein { margin: 0 0 14px; height: 110px; }
.ev-unter { margin-top: var(--gap); }
.ev-rangliste { padding: 4px 0; overflow: hidden; }
.ev-rang { display: flex; width: 100%; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; }
.ev-rang + .ev-rang { border-top: .7px solid var(--sep); }
.ev-rang.ich { background: rgba(92, 129, 255, .08); }
.ev-rang:active, .ev-rang.pressed { background: rgba(255, 255, 255, .06); }
.ev-platz { width: 26px; flex: none; text-align: center; font-size: 26px; font-weight: 700; }
.ev-platz.p1 { color: #F5C242; } .ev-platz.p2 { color: #D9DCE1; } .ev-platz.p3 { color: #E08A3C; } .ev-platz.px { color: rgba(255, 255, 255, .45); }
.ev-rmid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-rname { font-size: 19px; font-weight: 700; color: var(--text); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ev-rname .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ev-rname .pm { font-size: 22px; font-weight: 700; flex: none; }
.ev-rsub { font-size: 13px; color: var(--text2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-hinweis { font-size: 11.5px; color: var(--text2); text-align: center; padding: 14px 10px 0; line-height: 1.3; }
.ev-austreten { display: block; margin: 28px auto 0; color: var(--ios-red); font-size: 16px; padding: 10px 20px; }
.ev-austreten:active { opacity: .5; }
.ev-foto { position: absolute; right: 20px; bottom: calc(20px + var(--safe-bottom)); width: 56px; height: 56px; border-radius: 50%;
  background: var(--field); display: flex; align-items: center; justify-content: center; color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .5); z-index: 4; }
.ev-foto:active { transform: scale(.95); }

/* Mini-Profil */
.ev-person { padding: 0 20px 20px; display: flex; flex-direction: column; align-items: center; }
.ev-p-name { font-size: 21px; font-weight: 700; color: var(--text); margin: 12px 0 16px; text-align: center; }
.ev-p-info { color: var(--text2); font-size: 14px; text-align: center; }
.ev-werte { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; width: 100%; margin-bottom: 18px; }
.ev-wert { background: var(--field); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center;
  gap: 3px; min-width: 0; }
.ev-wert .w { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ev-wert .l { font-size: 11px; color: var(--text2); }
.ev-knoepfe { display: flex; flex-direction: column; gap: 10px; width: 100%; align-items: center; }
.ev-knopf { width: 100%; height: 50px; border-radius: 14px; background: var(--field); color: var(--blue); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.ev-knopf.blau { background: var(--blue); color: #fff; }
.ev-knopf:active { opacity: .7; }
.ev-knopf:disabled { opacity: 1; color: var(--text2); }
.ev-knopf.fertig { color: var(--text2); }

/* Link-Vorschau */
.ev-vorschau { padding: 0 20px 20px; }
.ev-v-info { text-align: center; color: var(--text2); font-size: 14px; margin-bottom: 20px; }
.ev-rang.ctx-clone { background: var(--card); }
.alert .a-msg { overflow-wrap: anywhere; }

/* Badge mit der Zahl offener Freundschaftsanfragen (Freunde-Knopf im Events-Kopf und Tab) */
.ev-badge-wrap { position: relative; display: inline-flex; }
.ev-badge { position: absolute; top: -5px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--card); pointer-events: none; }
.ev-badge[hidden] { display: none; }
.ev-kopf-icons button { position: relative; }
.ev-kopf-icons .ev-badge { top: -2px; right: -2px; }
