/*
 * Tandem Time: layout fixes for tasks synced from Redmine (loaded after app.css, see patch-ui-styles.php).
 * Grid column widths come from inline CSS variables of GridView, hence !important.
 * Tasks and projects from Redmine cannot be created, edited or deleted in Cattr (403), their buttons are hidden.
 */

/* Tasks list: wide task name that wraps, compact actions */
.crud__table:has(.tasks-grid__task) {
    --grid-columns-gt-1620: minmax(280px, 6fr) minmax(160px, 2fr) minmax(90px, 1fr) 96px !important;
    --grid-columns-lt-1620: minmax(240px, 5fr) minmax(140px, 2fr) minmax(80px, 1fr) 96px !important;
}
.tasks-grid__issue {
    margin-right: 0.5em;
    white-space: nowrap;
}
.tasks-grid__task,
.tasks-grid__project {
    white-space: normal;
    overflow-wrap: anywhere;
}
.crud__table:has(.tasks-grid__task) .action-button .at-btn__text {
    display: none;
}
.crud__table:has(.tasks-grid__task) .action-button:has(.icon-edit, .icon-trash-2, .icon-corner-down-right) {
    display: none;
}
.crud:has(.tasks-grid__task) .crud__control-items .at-btn:has(.icon-edit) {
    display: none;
}

/* Task page: no "Edit" and "Relations" (403 for tasks from Redmine). Only task pages have "Relations". */
.crud__item-view:has(.page-controls .icon-corner-down-right) .page-controls .at-btn:has(.icon-edit, .icon-corner-down-right) {
    display: none;
}

/* Projects list */
.crud__table:has(.projects-grid__project) {
    --grid-columns-gt-1620: minmax(260px, 6fr) minmax(120px, 1.5fr) minmax(100px, 1.5fr) minmax(90px, 1fr) 260px !important;
    --grid-columns-lt-1620: minmax(220px, 5fr) minmax(110px, 1.5fr) minmax(90px, 1.5fr) minmax(80px, 1fr) 260px !important;
}
.projects-grid__project {
    white-space: normal;
    overflow-wrap: anywhere;
}
.crud__table:has(.projects-grid__project) .action-button .at-btn__text {
    display: none;
}
.crud__table:has(.projects-grid__project) .action-button:has(.icon-crop, .icon-edit, .icon-trash-2) {
    display: none;
}

/* Dashboard: wider sidebar, full task and project names */
@media (min-width: 1301px) {
    .timeline[data-v-11349ae5] {
        grid-template-columns: 420px 1fr 1fr;
    }
}
.task__title[data-v-604b5d8c],
.project__title[data-v-604b5d8c] {
    white-space: normal;
}

/* Dashboard: the screenshots block shows only empty frames and the activity percentage of every
   interval; screenshots are disabled and the activity level is not shown (Tandem decision 2026-10-02) */
.timeline .intervals > .screenshots {
    display: none;
}

/* Task select (manual time) */
.crud__edit-view .vs__selected {
    width: auto;
    white-space: normal;
}
.vs__dropdown-option {
    white-space: normal;
}

/* Time use report */
.text-ellipsis[data-v-fe89fff8] {
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Screens that stay empty: Redmine issues have no dates and no estimates */
.at-menu__item:has(> a[href="/calendar"]),
.at-menu__item:has(> a[href="/report/planned-time"]) {
    display: none;
}
