:root {
    --c-ok:      #198754;
    --c-missing: #dc3545;
    --c-brand:   #0d6efd;
}

body {
    background-color: #4d4d4d;
}

@media (max-width: 991px) {
    .mobile-fixed-top {
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1030;
    }

    body {
        padding-top: 3.5rem;
    }
}

@media (max-width: 340px) {

    body {
        padding-top: 5.5rem;
    }
}


main {
    padding: 1.25rem;
    margin: 0 auto;
}

.status-ok      { color: var(--c-ok);      }
.status-missing { color: var(--c-missing); }

.ui-button:not(.ui-button-icon-only) {
    width: 100% !important;
}

.visitor td {
    font-weight: bold;
    font-style: italic;
    text-transform: uppercase;
}

/* Stats-Leiste */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1.25rem;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-size: 0.875rem;
}

.stat-item .stat-label         { color: #6c757d; font-weight: 500; }
.stat-item .stat-label::after  { content: ':'; }
.stat-item .stat-value         { font-weight: 700; }
.stat-item .stat-sep           { color: #adb5bd; }

.stat-status {
    font-size: 0.8rem;
    color: #6c757d;
}

.all-evacuated-msg {
    color: var(--c-ok);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Standort-Karten */
.standortCard {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 2px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7fb 100%);
    border: 1px solid #d7e0ea;
    border-left: 6px solid var(--c-brand);
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    width: 100%;
    max-width: 400px;
}

.standortCard::before {

    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--c-brand);
    margin-bottom: 2px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.standortCard.grey {
    background: linear-gradient(135deg, #e0e0e0 0%, #c8c8c8 100%);
    border-left-color: #9ca3af;
    color: #6b7280;
}

.standortCard.grey::before   { color: #9ca3af; }

.standortCard.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left-color: var(--c-ok);
}

.standortCard.active::before { color: var(--c-ok); }

.standortCard:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.standortCard:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.10);
}

.standortCard:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

.card {
    --bs-card-spacer-x: 0.4rem;
    --bs-card-spacer-y: 0.4rem;
}

/* WebSocket Status-Indikator */
.ws-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #dc3545;
    user-select: none;
    white-space: nowrap;
}

.ws-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dc3545;
    flex-shrink: 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.ws-status.connecting             { color: #ffc107; }
.ws-status.connecting .ws-dot    {
    background-color: #ffc107;
    animation: ws-blink 0.8s ease-in-out infinite;
}

.ws-status.online                 { color: #a3cfbb; }
.ws-status.online .ws-dot        {
    background-color: #2ecc71;
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.3);
    animation: ws-pulse 2s ease-in-out infinite;
}

@keyframes ws-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.25; }
}

@keyframes ws-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.3); }
    50%       { box-shadow: 0 0 0 5px rgba(46, 204, 113, 0.08); }
}

#online-locations {
    color: #a3cfbb;
    font-size: 0.8rem;
}

/* DataTables – Responsive Child Row */
table.dataTable > tbody > tr.child {
    background-color: #f8f9fa;
}

table.dataTable > tbody > tr.child td.child {
    border-bottom: 2px #212529 dotted;
    padding-bottom: 1rem;
}

/* Sessions-Übersicht */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-card details > summary {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    border-top: 1px solid rgba(0, 0, 0, .125);
    user-select: none;
}

.session-card details > summary::-webkit-details-marker { display: none; }

.session-card details[open] > summary {
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}
