/* css/style.css */
:root {

    --primary: #003d66;
    --primary-light: #003d66;
/*   --primary: #004080; */
/*   --primary-light: #0059b3; */
    --bg-grey: #f0f2f5;
    --bg-red: #ff0000;
    --white: #ffffff;
    --bg-blue: #0063a1;
    --text: #333;
    --border: #ddd;
    --awb-background-image: linear-gradient(180deg, #003d66 0%, #0063a1 100%);

    
    /* Kategoriefarben als Variablen für einfache Anpassung */
    --c-plenum: #d32f2f;
    --c-fraktion: #1976d2;
    --c-enquete: #FFFF00;
    --c-vorstand: #b22222;
    --c-ausschuss: #0000FF;
    --c-presselage: #BA55D3;
    --c-arbeitskreis: #FFD700;
    --c-wahlkreis: #388e3c;
    --c-sonstiges: #9e9e9e;
    --c-frei: rgba(0, 193, 255, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-grey);
    color: var(--text);
    margin: 0;
    padding-bottom: 90px; /* Platz für Menü */
}

/* Header */
header {
    background: var(--primary);
    color: var(--white);
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
h1 { margin: 0; font-size: 1.2rem; font-weight: 600; }
h2 { margin: 5px; font-size: 1rem; font-weight: 600; }



.container { padding: 0px 15px 15px 15px; max-width: 800px; margin: 0 auto; }
.hidden { display: none !important; }

/* --- LISTENANSICHT (Kalender & News) --- */
.date-header {
    margin-top: 20px;
    margin-bottom: 8px;
    padding-left: 5px;
    font-size: 1rem;
    font-weight: 800;
    color: #003d66;
    text-transform: uppercase;
text-shadow: 3px 3px 2px rgba(159,157,157,0.6);
    letter-spacing: 0.5px;
}
.event-item {
    background: var(--white);
    padding: 6px 15px 6px 15px; 
    border-bottom: 1px solid #f0f0f0;
    display: flex; align-items: center;
    cursor: pointer;
}
.event-item:first-child { border-top-left-radius: 12px; border-top-right-radius: 12px; }
.event-item:last-child { border-bottom: none; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
.event-item:active { background-color: #eef4ff; }



/* Kategorie Balken  */
.cat-Plenum     { border-left: 6px solid var(--c-plenum); border-right: 6px solid var(--c-plenum); }
.cat-Presselage     { border-left: 6px solid var(--c-presselage); border-right: 6px solid var(--c-presselage); }
.cat-Fraktion   { border-left: 6px solid var(--c-fraktion); border-right: 6px solid var(--c-fraktion); }enquete
.cat-Enquete   { border-left: 6px solid var(--c-enquete); border-right: 6px solid var(--c-enquete); }
.cat-Vorstand   { border-left: 6px solid var(--c-vorstand); border-right: 6px solid var(--c-vorstand); }
.cat-Ausschuss  { border-left: 6px solid var(--c-ausschuss); border-right: 6px solid var(--c-ausschuss); }
.cat-Arbeitskreis  { border-left: 6px solid var(--c-arbeitskreis); border-right: 6px solid var(--c-arbeitskreis); }
.cat-Wahlkreis  { border-left: 6px solid var(--c-wahlkreis); border-right: 6px solid var(--c-wahlkreis); }
.cat-Sonstiges  { border-left: 6px solid var(--c-sonstiges); border-right: 6px solid var(--c-sonstiges); }
.cat-Frei  { border-left: 6px solid var(--c-frei); border-right: 6px solid var(--c-frei); }

.event-cat-label { 
    font-size: 0.7rem; color: #888; text-transform: uppercase; 
    font-weight: bold; margin-bottom: 2px; display: block; 
}

.event-time { font-weight: 700; color: var(--primary); width: 55px; font-size: 0.85rem; flex-shrink: 0; }
.event-info { flex-grow: 1; padding-right: 10px; }
.event-title { font-size: 1rem; font-weight: 600; color: #222; margin-bottom: 2px; }
.event-loc-short { font-size: 0.85rem; color: #777; }
.event-arrow { color: #ccc; font-size: 1.2rem; }

/* News Items */
.news-item {
    background: var(--white); padding: 20px; margin-bottom: 15px;
    border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.news-date { font-size: 0.8rem; color: var(--primary); font-weight: bold; text-transform: uppercase; margin-bottom: 5px; }
.news-title { font-size: 1rem; font-weight: bold; color: #222; margin-bottom: 10px; }
.news-content { font-size: 0.95rem; color: #444; line-height: 1.5; white-space: pre-wrap; }

/* --- DETAIL OVERLAY --- */
.detail-modal {
    display: none; position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--white); z-index: 2000;
    overflow-y: auto; animation: slideUp 0.25s ease-out;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.detail-header {
    background: var(--primary); border-bottom: 1px solid #eee;
    color: #FFF;
    padding: 15px 20px; position: sticky; top: 0;
    display: flex; justify-content: space-between; align-items: center;
}

/*  .btn-close { font-size: 1.5rem; background: none; border: none; cursor: pointer; color: #555; }  */
.btn-close { font-size: 1.5rem; background: red; border: none; cursor: pointer; color: #fff; }

.detail-content { padding: 25px 20px; }
.detail-label { font-size: 0.75rem; text-transform: uppercase; color: #888; font-weight: bold; margin-top: 20px; display: block; }
.detail-text { font-size: 1.05rem; color: #333; line-height: 1.5; }

.file-download-box {
    display: flex; align-items: center;
    background: #f8f9fa; border: 1px solid #e9ecef;
    padding: 15px; border-radius: 10px; margin-top: 10px;
    text-decoration: none; color: #333;
}
.icon-pdf { font-size: 1.4rem; margin-right: 15px; }

/* --- ADRESSBUCH --- */
.contact-card {
    background: var(--white); border-radius: 12px;
    padding: 20px; margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.contact-row {
    display: flex; 
    align-items: center; 
    /* HIER DIE ÄNDERUNG: Startet links */
    justify-content: flex-start; 
    gap: 8px; /* Abstand zwischen Icon und Text */
    padding: 6px 0; 
    border-bottom: 1px solid #eee;
}
/* Drückt den Button ganz nach rechts, falls einer da ist */
.contact-row .btn-mini {
    margin-left: auto; 
}

.contact-row:last-child { border-bottom: none; }

.contact-val { 
    font-size: 1rem; color: #333; 
/*    font-family: monospace;  */ /* Alex */
    /* Lange E-Mails umbrechen: */
    word-break: break-all; 
    overflow-wrap: anywhere;
    line-height: 1.4;
}

.contact-note {
    background: #fff8e1; color: #666; font-size: 0.85rem;
    padding: 8px; border-radius: 6px; margin-top: 10px;
    font-style: italic; border-left: 3px solid #ffd54f;
}

.btn-mini {
    background: var(--primary); color: white;
    text-decoration: none; padding: 6px 12px;
    border-radius: 20px; font-size: 0.8rem;
    white-space: nowrap; /* Button Text nicht umbrechen */
    box-shadow: 0px 8px 10px -7px #000000, 5px 5px 15px 5px rgba(0,0,0,0);
}

.btn-mini-close {
    background: var(--bg-red); color: white;
    text-decoration: none; padding: 6px 12px;
    border-radius: 20px; font-size: 0.8rem;
    white-space: nowrap; /* Button Text nicht umbrechen */
    box-shadow: 0px 8px 10px -7px #000000, 5px 5px 15px 5px rgba(0,0,0,0);
}


/* --- NAVIGATION UNTEN --- */
.nav {
    display: flex; justify-content: space-between; gap: 15px;
    background: var(--awb-background-image); padding: 15px; position: fixed;
    bottom: 0; width: 100%; box-sizing: border-box;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); border-top: 1px solid #eee;
}
.nav-item {
    flex: 1; text-align: center; padding: 5px 0; font-size: 24px;
    border-radius: 10px; background: #2b88af; color: #666;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
    user-select: none; -webkit-tap-highlight-color: transparent;
 /*   box-shadow: 0 -2px 10px rgba(0,0,0,0.05); border-top: 1px solid #eee; */
    box-shadow: 0px 8px 10px -7px #000000, 5px 5px 15px 5px rgba(0, 0, 0, 0);
}
.nav-item.active {
    background: var(--primary); color: white;
 /*   box-shadow: 0 4px 10px rgba(0,64,128,0.3); transform: translateY(-2px); */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05); border-top: 1px solid #eee; 

}

/* --- TOAST (KOPIER HINWEIS) --- */
#copy-toast {
    visibility: hidden; min-width: 250px; background-color: #333; 
    color: #fff; text-align: center; border-radius: 4px; padding: 16px; 
    position: fixed; z-index: 3000; left: 50%; bottom: 100px; 
    transform: translateX(-50%); font-size: 1rem;
}

/* --- DASHBOARD STYLES --- */
/* --- DASHBOARD STYLES (NEU & SCHICK) --- */
.dash-header {
    /* Farbverlauf statt nur Blau: Sieht moderner aus */
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 25px 20px;
    border-radius: 20px 20px 20px 20px;
    margin-top: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,64,128,0.2);
    position: relative; /* Für Logo Positionierung */
}

/* Das Logo oben rechts */
.dash-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 50px; /* Größe anpassen */
    width: auto;
    opacity: 0.9;
}

.dash-greeting { 
    font-size: 1.4rem; 
    font-weight: 700; 
    margin: 0; 
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding-right: 60px; /* Platz für das Logo lassen */
}

.dash-date { 
    color: rgba(255,255,255,0.8); /* Leicht transparentes Weiß */
    font-size: 0.95rem; 
    font-weight: 500;
}

.dash-section-title {
    margin: 0 0 12px 10px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 1px;
}

/* Karten etwas moderner */
.dash-card {
    background: var(--white);
    border-radius: 15px; /* Runder */
    padding: 6px 16px 6px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 5px solid transparent;
    transition: transform 0.2s;
}
.dash-card:active { transform: scale(0.98); }
/* Spezielle Farben für Dashboard Karten */
.dash-card.news-highlight {border-right: 5px solid transparent; border-left-color: var(--primary); border-right-color: var(--primary); }

.dash-card.event-highlight { border-left-color: var(--c-sonstiges); border-right-color: var(--c-sonstiges);} /* Fallback */

.dash-empty { text-align: center; color: #999; padding: 15px; font-style: italic; }

/* Quick Buttons im Dashboard */
.dash-actions { display: flex; gap: 10px; margin-bottom: 20px; }
.dash-btn {
    flex: 1; background: var(--white); padding: 15px;
    border-radius: 12px; text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    color: var(--primary); font-weight: bold;
    cursor: pointer;
}

.cat-Plenum     { border-left: 6px solid var(--c-plenum); border-right: 6px solid var(--c-plenum #d32f2f); }
.cat-Presselage     { border-left: 6px solid var(--c-presselage); border-right: 6px solid var(--c-presselage #BA55D3); }
.cat-Fraktion   { border-left: 6px solid var(--c-fraktion); border-right: 6px solid var(--c-fraktion #5919d2); }
.cat-Enquete   { border-left: 6px solid var(--c-enquete); border-right: 6px solid var(--c-enquete #FFFF00); }
.cat-Vorstand   { border-left: 6px solid var(--c-vorstand); border-right: 6px solid var(--c-vorstand #b22222); }
.cat-Ausschuss  { border-left: 6px solid var(--c-ausschuss); border-right: 6px solid var(--c-ausschuss #4359c7); }
.cat-Arbeitskreis  { border-left: 6px solid var(--c-arbeitskreis); border-right: 6px solid var(--c-arbeitskreis #FFD700); }
.cat-Wahlkreis  { border-left: 6px solid var(--c-wahlkreis); border-right: 6px solid var(--c-wahlkreis #8eb276); }
.cat-Sonstiges  { border-left: 6px solid var(--c-sonstiges); border-right: 6px solid var(--c-sonstiges #9e9e9e); }
.cat-Frei  { border-left: 6px solid var(--c-frei); border-right: 6px solid var(--c-frei #20d5d2); }

        .contact-note { background: #fff8e1; color: #666; font-size: 0.85rem; padding: 8px; border-radius: 6px; margin-top: 10px; font-style: italic; border-left: 3px solid #ffd54f; }
        .event-cat-label { font-size: 0.7rem; color: #888; text-transform: uppercase; font-weight: bold; margin-bottom: 2px; display: block; }
        .search-bar-container { background: #ffffff; padding: 2px 2px; position: sticky; top: 54px; z-index: 90; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 10px; }
        .search-input { width: 100%; padding: 10px 15px; border-radius: 20px; border: 1px solid #ddd; background-color: #f0f2f5; font-size: 1rem; outline: none; box-sizing: border-box; }
        .search-input:focus { border-color: #004080; background: #fff; }
        #copy-toast { visibility: hidden; min-width: 250px; background-color: #333; color: #fff; text-align: center; border-radius: 2px; padding: 16px; position: fixed; z-index: 3000; left: 50%; bottom: 100px; transform: translateX(-50%); font-size: 1rem; }
        #copy-toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }
        @keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 100px; opacity: 1;} }
        @keyframes fadeout { from {bottom: 100px; opacity: 1;} to {bottom: 0; opacity: 0;} }

        /* NEU: OFFLINE BANNER */
        #offline-banner {
            display: none;
            background-color: #d32f2f; color: white;
            text-align: center; padding: 5px; font-size: 0.8rem;
            position: sticky; top: 0; z-index: 200;
        }

/* Login */
#login-view {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
}
input[type="text"] {
    width: 100%; padding: 12px; margin: 2px 0;
    border: 1px solid var(--border); border-radius: 8px;
    box-sizing: border-box; font-size: 1rem;
}
.btn-login {
    background: var(--primary); color: white; border: none;
    padding: 12px; width: 100%; border-radius: 8px;
    font-size: 1rem; font-weight: bold; cursor: pointer;
}

#copy-toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }
@keyframes fadein { from {bottom: 0; opacity: 0;} to {bottom: 100px; opacity: 1;} }
@keyframes fadeout { from {bottom: 100px; opacity: 1;} to {bottom: 0; opacity: 0;} }

