* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
    margin: 0;
    font-family: var(--vz-font, 'Segoe UI', Arial, sans-serif);
    background: var(--vz-bg, #eef1f5);
    color: var(--vz-text, #222);
    font-size: 16px; /* verhindert Auto-Zoom beim Fokussieren von Inputs auf iOS */
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.45;
}
img { max-width: 100%; height: auto; }
a { color: var(--vz-link, #2b5faa); text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { letter-spacing: -.01em; line-height: 1.25; }

/* ===== Topbar / Navigation ===== */
.vz-site-banner {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}
.vz-topbar {
    background: var(--vz-topbar-bg, #2b5faa);
    color: var(--vz-topbar-text, #fff);
    box-shadow: 0 2px 4px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.vz-topbar-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.vz-logo {
    font-size: 1.25em;
    font-weight: bold;
    color: var(--vz-topbar-text, #fff) !important;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Glocke: immer sichtbar, unabhängig vom Menü-Status */
.vz-nav-bell {
    color: var(--vz-topbar-text, #fff) !important;
    font-size: 1.2em;
    position: relative;
    padding: 4px;
    line-height: 1;
}

/* Hamburger: per Default (Desktop) unsichtbar */
.vz-nav-toggle-input { display: none; }
.vz-nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    cursor: pointer;
}
.vz-nav-burger span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: var(--vz-topbar-text, #fff);
}

.vz-nav {
    display: flex;
    align-items: center;
}
.vz-nav a {
    color: var(--vz-topbar-text, #fff) !important;
    margin-left: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: .95em;
    white-space: nowrap;
    transition: background .15s ease;
}
.vz-nav a:hover { background: rgba(255,255,255,.15); text-decoration: none; }

/* ===== Mobile: Hamburger-Menü ===== */
@media (max-width: 780px) {
    .vz-nav-burger { display: flex; }

    .vz-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--vz-topbar-bg, #2b5faa);
        box-shadow: 0 4px 8px rgba(0,0,0,.2);
        padding: 6px 0;
    }
    .vz-nav-toggle-input:checked ~ .vz-nav {
        display: flex;
    }
    .vz-nav a {
        margin-left: 0;
        padding: 12px 20px;
        border-top: 1px solid rgba(255,255,255,.12);
        font-size: 1.02em;
    }
    .vz-nav a:first-child { border-top: none; }
    .vz-nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
}

.vz-main {
    max-width: 1000px;
    margin: 20px auto;
    padding: 0 16px 60px;
}
@media (max-width: 480px) {
    .vz-main { margin: 12px auto; padding: 0 10px 50px; }
}

.vz-card {
    background: var(--vz-card-bg, #fff);
    border: 1px solid var(--vz-border, #dbe1e8);
    border-radius: var(--vz-radius, 6px);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 1px 4px rgba(0,0,0,.03);
}
@media (max-width: 480px) {
    .vz-card { padding: 12px; border-radius: 8px; }
}
/* Einheitliche Trennlinie unter der ersten Überschrift einer Karte (Themes wie
   "retro" überschreiben dies mit einer eigenen farbigen Titelleiste) */
.vz-card > h3:first-child, .vz-card > h1:first-child {
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--vz-border, #eee);
    font-size: 1.08em;
}

/* ===== Buttons & Formulare (touch-freundlich, min. ~44px Ziel) ===== */
.vz-btn {
    display: inline-block;
    background: var(--vz-accent, #2b5faa);
    color: #fff;
    border: none;
    padding: 11px 18px;
    border-radius: var(--vz-radius, 6px);
    cursor: pointer;
    font-size: 1em;
    min-height: 44px;
    line-height: 1.2;
    margin: 2px 0;
    transition: filter .15s ease, transform .1s ease, box-shadow .15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.vz-btn:hover { filter: brightness(1.06); text-decoration: none; }
.vz-btn:active { transform: translateY(1px); }
.vz-btn.secondary { background: #8892a0; }
.vz-btn.danger { background: #c0392b; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local],
textarea, select {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--vz-border, #dbe1e8);
    border-radius: 4px;
    font-size: 1em; /* 16px -> kein Zoom-Sprung auf iOS beim Fokussieren */
    margin-bottom: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--vz-card-bg, #fff);
    color: var(--vz-text, #222);
    transition: border-color .15s ease, box-shadow .15s ease;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=date]:focus, input[type=datetime-local]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--vz-accent-solid, var(--vz-link, #2b5faa));
    box-shadow: 0 0 0 3px rgba(43,95,170,.15);
}
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238892a0' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
input[type=file] {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--vz-border, #dbe1e8);
    border-radius: 4px;
    background: rgba(0,0,0,.015);
    font-size: .9em;
    margin-bottom: 10px;
}
label { font-weight: 600; font-size: .9em; display: block; margin-bottom: 4px; }

form { max-width: 100%; }

/* Buttons/Formulare, die nebeneinander stehen (z.B. Freundschaftsanfrage annehmen/ablehnen),
   sollen auf schmalen Screens umbrechen und volle Breite annehmen */
@media (max-width: 480px) {
    .vz-comment form,
    .vz-comment > form { width: 100%; }
    .vz-btn { width: 100%; }
    .vz-btn + .vz-btn { margin-top: 6px; }
}

.vz-grid-2 { display: grid; grid-template-columns: 260px 1fr; gap: 16px; }
@media (max-width: 700px) { .vz-grid-2 { grid-template-columns: 1fr; } }

.vz-avatar { border-radius: 50%; object-fit: cover; background: #ccc; flex-shrink: 0; box-shadow: 0 0 0 2px var(--vz-card-bg, #fff), 0 0 0 3px rgba(0,0,0,.06); }
.vz-flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border-left: 4px solid; }
.vz-flash.error { background: #fdeaea; color: #a12a2a; border: 1px solid #f3b6b6; border-left: 4px solid #c0392b; }
.vz-flash.success { background: #eafaf0; color: #1c7a44; border: 1px solid #b7e6c6; border-left: 4px solid #1c7a44; }

.vz-comment { border-top: 1px solid var(--vz-border, #eee); padding: 10px 0; font-size: .95em; transition: background .15s ease; }
.vz-comment:first-child { border-top: none; }
.vz-meta { color: #8892a0; font-size: .8em; }

.vz-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 8px; }
.vz-photo-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 4px; }
@media (min-width: 481px) {
    .vz-photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); }
    .vz-photo-grid img { height: 140px; }
}

.vz-chat-box { height: 50vh; max-height: 420px; min-height: 220px; overflow-y: auto; border: 1px solid var(--vz-border,#dbe1e8); padding: 8px; border-radius: 6px; background: var(--vz-card-bg,#fff);}
.vz-chat-msg { margin-bottom: 6px; overflow-wrap: anywhere; }
.vz-chat-msg .who { font-weight: 600; margin-right: 6px; }

.vz-badge {
    display: inline-block;
    background: #e0453d;
    color: #fff;
    border-radius: 10px;
    font-size: .7em;
    font-weight: bold;
    padding: 1px 6px;
    margin-left: 3px;
    vertical-align: top;
}
.vz-notif-unread { background: rgba(43,95,170,.08); border-radius: 6px; }

/* Tabellen/lange Wörter/URLs nicht über den Bildschirmrand hinausschieben lassen */
table { max-width: 100%; }
* { overflow-wrap: break-word; }

.vz-footer {
    text-align: center;
    padding: 24px 16px 16px;
    color: #8892a0;
    font-size: .85em;
}
.vz-footer p { margin: 4px 0; }
.vz-copyright { opacity: .8; }
.vz-admin-login-link { color: #8892a0 !important; font-size: .95em; }
.vz-admin-login-link:hover { color: var(--vz-accent, #2b5faa) !important; }

.vz-translate-btn { font-size: .8em; color: #8892a0 !important; margin-left: 6px; }
.vz-translation-result {
    margin-top: 4px;
    padding: 6px 8px;
    background: rgba(43,95,170,.06);
    border-left: 3px solid var(--vz-accent, #2b5faa);
    border-radius: 4px;
    font-size: .92em;
    font-style: italic;
}

.vz-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: .88em;
    font-weight: 600;
    color: #65676b !important;
    text-decoration: none !important;
    padding: 3px 8px;
    border-radius: 4px;
}
.vz-like-btn:hover { background: rgba(0,0,0,.05); }
.vz-like-btn.vz-liked { color: var(--vz-link, #2b5faa) !important; }
.vz-like-icon { font-size: 1em; filter: grayscale(1) opacity(.6); }
.vz-like-btn.vz-liked .vz-like-icon { filter: none; }
.vz-like-count { font-variant-numeric: tabular-nums; font-weight: 400; }

.vz-event-card { display: flex; gap: 12px; align-items: center; }
.vz-event-date-badge {
    flex-shrink: 0;
    width: 56px; height: 56px;
    border-radius: 8px;
    background: var(--vz-accent, #2b5faa);
    color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: .8em; line-height: 1.1;
}
.vz-event-date-badge strong { font-size: 1.3em; }

.vz-feed-item { display: flex; gap: 10px; align-items: flex-start; }
.vz-feed-item .vz-avatar { flex-shrink: 0; }
.vz-feed-body { flex: 1; min-width: 0; }
.vz-feed-name { font-weight: 700; color: var(--vz-link, #2b5faa); }
.vz-feed-name:hover { text-decoration: underline; }

/* ===== Schieberegler-Captcha ===== */
.vz-slider-captcha { margin-bottom: 10px; }
.vz-slider-track {
    position: relative;
    height: 44px;
    background: #eef1f5;
    border: 1px solid var(--vz-border, #dbe1e8);
    border-radius: 22px;
    overflow: hidden;
    user-select: none;
}
.vz-slider-fill {
    position: absolute; top: 0; left: 0; bottom: 0;
    width: 34px;
    background: rgba(43,95,170,.15);
    transition: none;
}
.vz-slider-captcha.vz-slider-done .vz-slider-fill { background: rgba(28,122,68,.18); }
.vz-slider-label {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .9em; color: #65676b; pointer-events: none;
}
.vz-slider-handle {
    position: absolute; top: 3px; left: 0;
    width: 34px; height: 34px;
    background: var(--vz-accent, #2b5faa);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: grab;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    touch-action: none;
}
.vz-slider-captcha.vz-slider-done .vz-slider-handle { background: #1c7a44; cursor: default; }

/* ===== Messenger (Facebook-artige, unten andockbare Chat-Leiste) ===== */
.vz-messenger {
    position: fixed;
    right: 16px;
    bottom: 0;
    z-index: 200;
    font-size: 14px;
    width: 300px;
}
.vz-messenger-bar {
    background: var(--vz-card-bg, #fff);
    border: 1px solid var(--vz-border, #dbe1e8);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
}
.vz-messenger-toggle {
    background: none; border: none; cursor: pointer;
    font-weight: 700; font-size: .95em; color: var(--vz-text, #222);
    display: flex; align-items: center; gap: 6px;
    padding: 4px;
}
.vz-messenger-online { display: flex; gap: -6px; }
.vz-messenger-online .vz-msg-online-bubble {
    width: 28px; height: 28px; border-radius: 50%; margin-left: -8px;
    border: 2px solid var(--vz-card-bg, #fff); cursor: pointer; position: relative;
    object-fit: cover; background: #ccc;
}
.vz-messenger-online .vz-msg-online-bubble:first-child { margin-left: 0; }
.vz-msg-online-dot {
    position: absolute; bottom: -1px; right: -1px;
    width: 9px; height: 9px; border-radius: 50%;
    background: #31a24c; border: 2px solid var(--vz-card-bg, #fff);
}

.vz-messenger-panel {
    background: var(--vz-card-bg, #fff);
    border: 1px solid var(--vz-border, #dbe1e8);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,.14);
    height: 420px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.vz-messenger-panel-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    background: var(--vz-topbar-bg, #2b5faa);
    color: var(--vz-topbar-text, #fff);
    font-weight: 700;
    flex-shrink: 0;
}
.vz-messenger-icon-btn {
    background: none; border: none; color: inherit; cursor: pointer;
    font-size: 1em; padding: 2px 6px; border-radius: 4px;
}
.vz-messenger-icon-btn:hover { background: rgba(255,255,255,.18); }
#vzMsgPanelTitle { display: flex; flex-direction: column; line-height: 1.3; }
.vz-msg-status-online, .vz-msg-status-offline { font-size: .75em; font-weight: 400; opacity: .85; }

.vz-messenger-list { flex: 1; overflow-y: auto; }
.vz-msg-list-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; cursor: pointer;
    border-bottom: 1px solid var(--vz-border, #eee);
    position: relative;
}
.vz-msg-list-item:hover { background: rgba(0,0,0,.03); }
.vz-msg-list-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.vz-msg-list-name { font-weight: 600; font-size: .92em; }
.vz-msg-list-preview { font-size: .82em; color: #8892a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.vz-msg-online-indicator {
    width: 10px; height: 10px; border-radius: 50%; background: #31a24c;
    position: absolute; left: 40px; top: 34px; border: 2px solid var(--vz-card-bg, #fff);
}
.vz-msg-empty { padding: 20px; text-align: center; color: #8892a0; font-size: .9em; }

.vz-messenger-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.vz-messenger-messages { flex: 1; overflow-y: auto; padding: 10px 12px; }
.vz-msg-bubble-row { display: flex; margin-bottom: 6px; }
.vz-msg-bubble-row.mine { justify-content: flex-end; }
.vz-msg-bubble {
    max-width: 75%;
    padding: 7px 11px;
    border-radius: 16px;
    font-size: .9em;
    background: #e4e6eb;
    color: #050505;
    overflow-wrap: anywhere;
}
.vz-msg-bubble-row.mine .vz-msg-bubble {
    background: var(--vz-accent, #2b5faa);
    color: #fff;
}
.vz-msg-ticks { font-size: .75em; text-align: right; margin-top: 1px; color: #8892a0; }
.vz-msg-ticks.read { color: #2b8ce0; }

#vzMsgForm { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--vz-border, #eee); flex-shrink: 0; }
#vzMsgInput { flex: 1; margin-bottom: 0 !important; }
#vzMsgForm button {
    background: var(--vz-accent, #2b5faa); color: #fff; border: none;
    border-radius: 50%; width: 38px; height: 38px; cursor: pointer; font-size: 1.1em;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .vz-messenger { right: 0; width: 100%; }
    .vz-messenger-panel { height: 70vh; border-radius: 0; }
    .vz-messenger-bar { border-radius: 0; }
}
