/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

.calendar-task-tree {
    -moz-appearance: none;
    margin: 0;
}

/* align the treechildren text */
.calendar-task-tree > treechildren::-moz-tree-cell-text {
    margin-top: 1px;
    margin-bottom: 1px;
}

.calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress) {
    color: green !important;
}

:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress) {
    color: #00bd00 !important;
}

.calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) {
    background-color: green !important;
}

:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-row(inprogress, selected, focus) {
    background-color: #00bd00 !important;
}

.calendar-task-tree > treechildren::-moz-tree-cell-text(overdue) {
    color: red !important;
}

:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-cell-text(overdue) {
    color: #ff7a7a !important;
}

.calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) {
    background-color: red !important;
}

:root[lwt-tree-brighttext] .calendar-task-tree > treechildren::-moz-tree-row(overdue, selected, focus) {
    background-color: #ff7a7a !important;
}

.calendar-task-tree > treechildren::-moz-tree-cell-text(inprogress, selected, focus),
:root[lwt-tree-brighttext] .calendar-task-tree >
  treechildren::-moz-tree-cell-text(inprogress, selected, focus),
.calendar-task-tree > treechildren::-moz-tree-cell-text(overdue, selected, focus),
:root[lwt-tree-brighttext] .calendar-task-tree >
  treechildren::-moz-tree-cell-text(overdue, selected, focus) {
    color: HighlightText !important;
}

.calendar-task-tree > treechildren::-moz-tree-cell-text(completed) {
    text-decoration: line-through;
    font-style: italic;
}

.calendar-task-tree > treechildren::-moz-tree-cell-text(duetoday) {
    font-weight: bold;
}

.calendar-task-tree-col-priority {
    list-style-image: url(chrome://calendar-common/skin/icons/priority.svg);
    -moz-context-properties: fill;
    fill: currentColor;
}

.calendar-task-tree > treechildren::-moz-tree-image(calendar-task-tree-col-priority, normalpriority) {
    list-style-image: url(chrome://calendar-common/skin/task-images.png);
    -moz-image-region: rect(0 13px 13px 0);
}

.calendar-task-tree > treechildren::-moz-tree-image(calendar-task-tree-col-priority, highpriority) {
    list-style-image: url(chrome://calendar-common/skin/icons/priority.svg);
    -moz-image-region: none;
    -moz-context-properties: fill;
    fill: red;
    margin-inline-start: -2px;
}

:root[lwt-tree-brighttext] .calendar-task-tree >
  treechildren::-moz-tree-image(calendar-task-tree-col-priority, highpriority) {
    fill: #ff7a7a;
}

.calendar-task-tree > treechildren::-moz-tree-image(calendar-task-tree-col-priority, lowpriority) {
    list-style-image: url(chrome://calendar-common/skin/task-images.png);
    -moz-image-region: rect(0 26px 13px 13px);
}

.calendar-task-tree > treechildren::-moz-tree-image(calendar-task-tree-col-priority, selected, lowpriority) {
    -moz-image-region: rect(0 39px 13px 26px);
}

:root[lwt-tree-brighttext] .calendar-task-tree >
  treechildren::-moz-tree-image(calendar-task-tree-col-priority, lowpriority) {
    -moz-image-region: rect(0 39px 13px 26px);
}

treecol.calendar-task-tree-col-percentcomplete {
    text-align: end;
}
