/* ============================================================
   VÝBĚR ŽÁKA
   Sdílené prvky (panel-toolbar, btn-secondary, btn-small, form-group,
   goal-status-badge, goal-card, note-card-meta, slot-block-header...)
   jsou v shared/components.css nebo styles/styles.css - tenhle soubor
   doplňuje jen to, co goals.html potřebuje navíc.
   ============================================================ */

.new-goal-form {
    margin-top: var(--spacing-lg);
}

/* Hlavička sekce (U5 K3): nadpis se sbalovacím tlačítkem a vedle něj
   akce "+ Nový ...", vždy viditelná i u sbalené sekce. */
.section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
}

.section-header > h3 {
    flex: 1 1 auto;
    min-width: 0;
}

/* ============================================================
   DVOUSLOUPCOVÝ DETAIL ŽÁKA (U3 krok 4b/5, K8/K13)
   Cíle a Poznámky pod sebou na úzkém displeji, vedle sebe od šířky
   768 px - stejná hranice jako týdenní tabulka v U1.
   ============================================================ */

.student-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--spacing-lg);
    align-items: start;
}

.student-detail-grid > section {
    min-width: 0;
}

@media (min-width: 768px) {
    .student-detail-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* ============================================================
   HISTORIE CÍLE
   ============================================================ */

.goal-history {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border-light);
}

.goal-history-panel {
    margin-top: 8px;
}

.history-query {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.history-query input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-base);
    font-family: var(--font-family);
}

.history-query-result {
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    margin-bottom: 10px;
}

.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-version {
    background: var(--color-bg-primary);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: var(--font-size-small);
}

.history-version-range {
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.history-version-content {
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--color-text-primary);
}

@media (max-width: 767px) {
    .history-query {
        flex-direction: column;
        align-items: stretch;
    }
}
