/* Состояния посещаемости: общий компонент кабинета и журнала. */

:root {
    --tkd-hatch: repeating-linear-gradient(
        135deg,
        transparent 0 5px,
        var(--tkd-border-input) 5px 6px
    );
}

/* === Маркер состояния === */

.att-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
}

.att-mark--present {
    background: var(--tkd-status-done-bg);
    color: var(--tkd-status-done-fg);
}

.att-mark--present::before {
    content: '✓';
}

/* пропуск отделён от отмены цветом: раньше их различал только глиф */
.att-mark--absent {
    background: var(--tkd-status-error-bg);
    color: var(--tkd-status-error-fg);
}

.att-mark--absent::before {
    content: 'н';
}

.att-mark--unmarked {
    color: var(--tkd-muted-strong);
}

.att-mark--unmarked::before {
    content: '·';
}

.att-mark--cancelled {
    background: var(--tkd-status-off-bg);
    color: var(--tkd-status-off-fg);
}

.att-mark--cancelled::before {
    content: '✕';
}

/* образец там, где отмену несёт штриховка */
.att-mark--hatched {
    border: 1px solid var(--tkd-border-input);
    background-image: var(--tkd-hatch);
}

/* === Ячейка сетки === */

.att-cell {
    text-align: center;
    vertical-align: middle;
}

/* вне периода членства: ни глифа, ни подложки, ни скрытого текста */
.att-cell--void {
    background: none;
}

.att-cell--off {
    background-image: var(--tkd-hatch);
}

/* фон в этих режимах не печатается, отмена осталась бы без следа */
@media (forced-colors: active) {
    .att-cell--off {
        outline: 1px dashed CanvasText;
        outline-offset: -2px;
    }
}

@media print {
    .att-cell--off {
        outline: 1px dashed #000;
        outline-offset: -2px;
    }
}

/* === Легенда === */

.att-legend {
    margin: 0;
    color: var(--tkd-muted-strong);
    font-size: 0.8125rem;
}

.att-legend__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0 0 0.25rem;
}

.att-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

/* узкий телефон: легенда одной ровной колонкой вместо рваного переноса
   (две колонки рвали «занятие отменено» на 360) */
@media (max-width: 419.98px) {
    .att-legend__row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 0.375rem;
    }
}

.att-legend__note {
    margin: 0;
}
