/* Learner – minimales Custom-CSS, Rest über Bootstrap */

body {
    background-color: #f8f9fa;
}

/* Lernkarten (Drill + Leitner) */
.learn-card {
    background: #fff;
    border: 2px solid #adb5bd;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.15s, transform 0.15s ease;
    user-select: none;
}

.learn-card:active {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(1px);
}

/* Navbar etwas kompakter auf Mobile */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
}

/* Fortschrittsbalken */
.progress {
    border-radius: 4px;
}

/* Tabelle auf Mobile lesbar */
@media (max-width: 576px) {
    .table-responsive .table th,
    .table-responsive .table td {
        font-size: 0.8rem;
    }
}

/* Einstellungen: auf schmalen Screens Beschriftung über das Eingabefeld stellen statt daneben —
   nebeneinander bleibt für den Text nur eine schmale Spalte, die unschön mehrzeilig umbricht.
   !important, weil die Feldbreiten in settings.php als inline-style gesetzt sind. */
@media (max-width: 575.98px) {
    .settings-row {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem !important;
    }

    .settings-row input[type="text"] {
        width: 100% !important;
    }

    /* Zahlenfelder bleiben schmal — volle Breite wirkt für einen zweistelligen Wert überdimensioniert */
    .settings-row input[type="number"] {
        width: 7rem !important;
    }
}

/* Lernaktivität-Heatmap (Statistik) */
.heatmap-wrap {
    overflow-x: auto;
    text-align: center;
}

.heatmap-inner {
    display: inline-block;
}

.heatmap-months {
    position: relative;
    height: 16px;
    margin-left: 27px;
    font-size: 10px;
    color: #6c757d;
}

.heatmap-months span {
    position: absolute;
    top: 0;
    white-space: nowrap;
}

.heatmap-body {
    display: flex;
}

.heatmap-weekday-labels {
    display: grid;
    grid-template-rows: repeat(7, 11px);
    row-gap: 3px;
    width: 24px;
    margin-right: 3px;
    font-size: 10px;
    color: #6c757d;
}

.heatmap-grid {
    display: grid;
    grid-template-rows: repeat(7, 11px);
    grid-auto-flow: column;
    row-gap: 3px;
    column-gap: 3px;
}

.heatmap-cell {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    background-color: #ebedf0;
}

.heatmap-cell-empty {
    background-color: transparent;
}

.heatmap-cell.lvl-1 { background-color: #9be9a8; }
.heatmap-cell.lvl-2 { background-color: #40c463; }
.heatmap-cell.lvl-3 { background-color: #30a14e; }
.heatmap-cell.lvl-4 { background-color: #216e39; }
