/* Hilfsmittel: Spinner, Alerts, Charts und sonstige Utility-Klassen */

/* Lade-Spinner für Buttons */
.spinner-sm {
    display: inline-block;
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.2em;
    margin-right: 0.5em;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    -webkit-animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@-webkit-keyframes spin {
    to { -webkit-transform: rotate(360deg); }
}

/* Chart-Höhen */
#km-chart, #min-chart {
    height: 250px;
}

/* Aktivitäten-Auswahlliste */
.activities-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}

.activities-ul li {
    padding: 0.8em 1.2em;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease-in-out;
}

.activities-ul li:last-child {
    border-bottom: none;
}

.activities-ul li:hover {
    background-color: #f8f9fa;
}

.activities-ul li.selected {
    background-color: #0d6efd;
    color: white;
    font-weight: 500;
}

/* Ladeindikator und Alerts */
.loader, .alert {
    text-align: center;
    padding: 2em;
    color: #6c757d;
}

.alert {
    padding: 1em;
    border: 1px solid transparent;
    border-radius: .25rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.hidden {
    display: none;
}

/* Footer-Button-Gruppe (z.B. Kalender-Navigation) */
.footer-button-group {
    display: flex;
    align-items: center;
    gap: 0.5em;
    background-color: #f8f9fa;
    padding: 0.375rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.footer-button-group-label {
    font-weight: bold;
    font-size: 1rem;
    color: #212529;
    margin-right: 0.25em;
}

/* VT1-Schätzungs-Widget */
#vt1-estimation-row strong {
    font-weight: 600;
}

#vt1-result-hr, #vt1-result-pace {
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1em;
}

/* EF-Chart-Steuerelemente auf der Einzellauf-Seite ausblenden */
.ef-single-run-wrapper .ef-controls-container,
.ef-single-run-wrapper #ef-start,
.ef-single-run-wrapper #ef-end,
.ef-single-run-wrapper #ef-drift-filter,
.ef-single-run-wrapper #ef-only-aerobic,
.ef-single-run-wrapper #ef-load-btn {
    display: none !important;
}

.ef-single-run-wrapper .gtitle {
    display: none !important;
}

/* Barrierefreiheit: Screenreader-only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Tabellen-Wrapper */
.table-responsive { overflow-x: auto; }

/* Gestrichelte Border-Hilfklasse */
.border-dashed { border-style: dashed !important; }

/* Wochentag-Auswahl (Ausfallzeit-Modal) */
.weekday-selector { display: flex; flex-wrap: wrap; gap: 1em; }

/* Hinweis-Text (sekundäre Informationszeile) */
.hinweis { color: #6c757d; font-size: 0.95rem; margin-bottom: 1.5rem; }

/* ================================================================= */
/* Changelog-Seite                                                     */
/* ================================================================= */
.changelog-page { max-width: 780px; margin: 2.5rem auto 4rem; }

.changelog-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
}
.changelog-header-icon {
    font-size: 2rem;
    color: #007bff;
    line-height: 1;
}
.changelog-title { margin: 0; font-size: 1.8rem; font-weight: 700; }
.changelog-subtitle { color: #6c757d; margin: 0.2rem 0 0; font-size: 0.95rem; }

/* Timeline */
.changelog-timeline { display: flex; flex-direction: column; gap: 1.5rem; }

.changelog-version-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.changelog-version-latest {
    border-color: #007bff;
    box-shadow: 0 2px 12px rgba(0,123,255,0.12);
}

.changelog-version-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}
.changelog-version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: #f0f4f8;
    color: #444;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.3em 0.75em;
    border-radius: 20px;
    border: 1px solid #dce3ea;
}
.changelog-version-badge--latest {
    background: #007bff;
    color: #fff;
    border-color: #0069d9;
}
.changelog-version-current-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #007bff;
}

/* Sektionen */
.changelog-section { margin-bottom: 1.1rem; }
.changelog-section:last-child { margin-bottom: 0; }

.changelog-section-title {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.45em;
}
.changelog-section--new    .changelog-section-title { color: #198754; }
.changelog-section--improved .changelog-section-title { color: #0d6efd; }
.changelog-section--fixed  .changelog-section-title { color: #fd7e14; }
.changelog-section--internal .changelog-section-title { color: #6c757d; }

.changelog-items {
    list-style: none;
    padding: 0;
    margin: 0;
}
.changelog-items li {
    padding: 0.3rem 0 0.3rem 1.3rem;
    position: relative;
    font-size: 0.92rem;
    color: #333;
    border-bottom: 1px solid #f4f4f4;
}
.changelog-items li:last-child { border-bottom: none; }
.changelog-items li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: #adb5bd;
}
.changelog-items li.changelog-item--trainer {
    background: #f5f3ff;
    color: #5a4d7a;
}
.changelog-items li.changelog-item--trainer::before {
    color: #9b8ec4;
}

.changelog-placeholder {
    color: #adb5bd;
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
}

.changelog-empty {
    text-align: center;
    color: #adb5bd;
    padding: 3rem 0;
    font-size: 1.1rem;
}
.changelog-empty i { font-size: 2.5rem; display: block; margin-bottom: 1rem; }
