/* Трекер задач — дополнения к Bootstrap 5 */

.btn,
.form-control,
.form-select,
.nav-link {
    min-height: 44px;
}

.btn-sm,
.form-control-sm,
.form-select-sm {
    min-height: 36px;
}

.priority-low { background-color: #6c757d; color: #fff; }
.priority-medium { background-color: #fd7e14; color: #212529; }
.priority-high { background-color: #dc3545; color: #fff; }

.status-new { background-color: #0d6efd; color: #fff; }
.status-in_progress { background-color: #6610f2; color: #fff; }
.status-review { background-color: #ffc107; color: #212529; }
.status-done { background-color: #198754; color: #fff; }

[data-bs-theme="dark"] .priority-medium { background-color: #e0a800; color: #212529; }
[data-bs-theme="dark"] .status-review { background-color: #e0a800; color: #212529; }

.description-text {
    min-height: 1.5rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.comment-text {
    overflow-wrap: anywhere;
}

.tasks-table th a {
    color: inherit;
    text-decoration: none;
}

.tasks-table th a:hover {
    text-decoration: underline;
}

/* Смартфон: таблица превращается в карточки без горизонтальной прокрутки */
@media (max-width: 767.98px) {
    .tasks-table,
    .tasks-table tbody,
    .tasks-table tr,
    .tasks-table td {
        display: block;
        width: 100%;
    }

    .tasks-table thead {
        display: none;
    }

    .tasks-table tr {
        border: 1px solid var(--bs-border-color);
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        background-color: var(--bs-body-bg);
    }

    .tasks-table td {
        border: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.3rem 0.4rem;
    }

    .tasks-table td::before {
        content: attr(data-label);
        flex: 0 0 38%;
        font-weight: 600;
        color: var(--bs-secondary-color);
        font-size: 0.875rem;
    }

    .tasks-table td:last-child {
        display: block;
    }

    .tasks-table td:last-child::before {
        display: block;
        margin-bottom: 0.4rem;
    }

    .tasks-table .d-flex {
        gap: 0.4rem !important;
    }
}
