/* frd/css/main.css */

/* Allgemeine Stile */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    color: #333;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- FINALE STABILE NAVIGATION v6 (Zentral & Vereinheitlicht) --- */
header {
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Wichtig für die Positionierung der Dropdowns */
}

header h1 {
    margin: 0;
    font-size: 1.5em;
}

header h1 a {
    color: #FFFFFF;
    text-decoration: none;
}

.header-controls {
    display: flex;
    align-items: center;
}

.language-switcher {
    margin-right: 15px;
}

.language-switcher a {
    color: #fff;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-decoration: none;
}

.language-switcher a.active {
    font-weight: bold;
    border-color: #555;
    background-color: #555;
}

/* Stile für die klickbaren Icons (Hamburger & User) */
.user-icon {
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu {
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    width: 30px;
    height: 25px;
}

.hamburger-menu .bar {
    height: 3px;
    width: 25px;
    background-color: white;
    border-radius: 10px;
    margin: 4px 0;
}

/* Dies ist jetzt die ZENTRALE Klasse für ALLE Dropdowns */
.header-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px); /* Positioniert das Menü 5px unter dem Header */
    right: 20px;
    background-color: #3c3c3c;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1001;
    min-width: 220px;
    border: 1px solid #555;
    padding: 5px 0;
}

/* Diese Klasse macht das jeweilige Menü sichtbar */
.header-dropdown.is-open {
    display: block;
}

/* Allgemeine Stile für Links in allen Dropdowns */
.header-dropdown a, .header-dropdown li a {
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #555;
}

.header-dropdown a:last-child, .header-dropdown li:last-child a {
    border-bottom: none;
}

.header-dropdown a:hover, .header-dropdown li a:hover {
    background-color: #555;
}

.header-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
/* --- ENDE DES NEUEN NAVIGATIONSTEILS --- */

/* Main Content Wrapper */
.main-content {
    min-height: calc(100vh - 120px);
}

/* Footer-Stile */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 15px 20px;
    margin-top: 20px;
}

/* Formular-Stile */
form {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
}
form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}
form input, select {
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
form button, .button {
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}
form button:hover, .button:hover {
    background-color: #218838;
}

/* Message Boxen für Feedback */
.message { padding: 15px; margin-bottom: 20px; border-radius: 5px; font-weight: bold; border: 1px solid transparent; }
.message.success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; }
.message.error { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; }

/* Stile für Zugführerliste & Mitgliederliste */
.zugfuehrer-status-box, .zugfuehrer-apply-box, .zugfuehrer-queue-box, .zugfuehrer-history-box, .members-list-group {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.members-list-group h2 { border-bottom: 2px solid #eee; padding-bottom: 5px; }
.members-list-group ul { list-style: none; padding-left: 0; }
.members-list-group li { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid #f0f0f0; }
.rank-select { padding: 5px; }

/* Stile für die überarbeitete Warteschlange */
.zugfuehrer-queue-box ol#queue-list { list-style: none; padding-left: 0; counter-reset: queue-counter; }
.zugfuehrer-queue-box ol#queue-list li { display: flex; align-items: center; padding: 12px 10px; border-bottom: 1px solid #e9e9e9; }
.zugfuehrer-queue-box ol#queue-list li::before { counter-increment: queue-counter; content: counter(queue-counter) "."; font-weight: bold; margin-right: 15px; color: #666; min-width: 20px; }
.drag-handle { cursor: move; color: #999; font-size: 1.2em; margin-right: 15px; }
.remove-from-queue {
    margin-left: auto;
    font-size: 1.5em;
    line-height: 1;
    color: red;
    cursor: pointer;
}
.queue-item-main { display: flex; flex-direction: column; }
.queue-item-main .username { font-weight: bold; }
.queue-item-main .timeslot { font-size: 0.9em; color: #555; }
.queue-item-date {
    margin-left: 40px;
    font-size: 0.9em;
    color: #333;
    background-color: #e9ecef;
    padding: 3px 8px;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

/* Stile für das Modal-Fenster */
.modal { display: none; position: fixed; z-index: 1001; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: #fefefe; margin: 15% auto; padding: 20px; border: 1px solid #888; width: 80%; max-width: 500px; border-radius: 8px; }
.modal-close-btn { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.timeslot-options label { display: block; margin: 10px 0; padding: 10px; border: 1px solid #ddd; border-radius: 5px; cursor: pointer; }
.timeslot-options input[type="radio"] { margin-right: 10px; }
.modal-actions { margin-top: 20px; text-align: right; }
.modal-actions .button { margin-left: 10px; }
.modal-actions .cancel-btn { background-color: #6c757d; }

/* Stile für klickbaren Tooltip */
.info-tooltip-container { position: relative; display: inline-block; }
.info-tooltip-icon { cursor: pointer; border-bottom: 1px dotted #000; }
.info-tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    top: 150%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
}
.info-tooltip-text.active { visibility: visible; opacity: 1; }

/* --- NEU: Verbesserte Stile für die Historien-Tabelle --- */
.zugfuehrer-history-box table {
    border-spacing: 0;
    margin-top: 10px;
}
.zugfuehrer-history-box th,
.zugfuehrer-history-box td {
    padding: 12px 15px;
    text-align: left;
}
.zugfuehrer-history-box th:nth-child(4),
.zugfuehrer-history-box td:nth-child(4) {
    text-align: center;
}
 .zugfuehrer-history-box th:nth-child(5),
 .zugfuehrer-history-box td:nth-child(5) {
    text-align: right;
}
.zugfuehrer-history-box .button {
    padding: 6px 12px;
    font-size: 0.9em;
}

.notification-dot {
    display: inline-block;
    background-color: #ef4444; /* Rot */
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    font-weight: bold;
    margin-left: 5px;
    vertical-align: middle;
}