# -*- coding: utf-8 -*-
# gui/styles/ticket.py

"""Стили для модуля Ticket (канбан-доска, карточки задач, бейджи, фильтры)."""

TICKET = {

    # ------------------------------------------------------------------
    # Канбан-колонка
    # ------------------------------------------------------------------

    "KANBAN_COLUMN": """
        QFrame {
            background-color: palette(base);
            border: 1px solid palette(mid);
            border-radius: 6px;
        }
    """,

    "KANBAN_COLUMN_LIGHT": """
        QFrame {
            background-color: #F7F8F9;
            border: 1px solid #DFE1E6;
            border-radius: 6px;
        }
    """,

    "KANBAN_COLUMN_DARK": """
        QFrame {
            background-color: #2D2D2D;
            border: 1px solid #5A5A5A;
            border-radius: 6px;
        }
    """,

    # ------------------------------------------------------------------
    # Заголовок колонки
    # ------------------------------------------------------------------

    "KANBAN_COLUMN_HEADER": """
        QLabel {
            font-size: 13px;
            font-weight: 600;
            color: palette(window-text);
            background-color: transparent;
            text-transform: uppercase;
        }
    """,

    "KANBAN_COLUMN_HEADER_LIGHT": """
        QLabel {
            font-size: 13px;
            font-weight: 600;
            color: #5E6C84;
            background-color: transparent;
            text-transform: uppercase;
        }
    """,

    "KANBAN_COLUMN_HEADER_DARK": """
        QLabel {
            font-size: 13px;
            font-weight: 600;
            color: #B8C0CC;
            background-color: transparent;
            text-transform: uppercase;
        }
    """,

    # ------------------------------------------------------------------
    # Счётчик задач в заголовке колонки
    # ------------------------------------------------------------------

    "KANBAN_COUNTER": """
        QLabel {
            font-size: 12px;
            font-weight: 600;
            color: palette(window-text);
            background-color: palette(light);
            border-radius: 8px;
            min-width: 20px;
            min-height: 20px;
            qproperty-alignment: AlignCenter;
        }
    """,

    "KANBAN_COUNTER_LIGHT": """
        QLabel {
            font-size: 12px;
            font-weight: 600;
            color: #5E6C84;
            background-color: #EBECF0;
            border-radius: 8px;
            min-width: 20px;
            min-height: 20px;
            qproperty-alignment: AlignCenter;
        }
    """,

    "KANBAN_COUNTER_DARK": """
        QLabel {
            font-size: 12px;
            font-weight: 600;
            color: #B8C0CC;
            background-color: #3C3C3C;
            border-radius: 8px;
            min-width: 20px;
            min-height: 20px;
            qproperty-alignment: AlignCenter;
        }
    """,

    # ------------------------------------------------------------------
    # Карточка задачи
    # ------------------------------------------------------------------

    "TASK_CARD": """
        QFrame {
            background-color: palette(button);
            border: 1px solid palette(mid);
            border-radius: 6px;
        }
        QFrame:hover {
            border-color: palette(highlight);
        }
    """,

    "TASK_CARD_LIGHT": """
        QFrame {
            background-color: #FFFFFF;
            border: 1px solid #DFE1E6;
            border-radius: 6px;
        }
        QFrame:hover {
            border-color: #85B8FF;
        }
    """,

    "TASK_CARD_DARK": """
        QFrame {
            background-color: #3C3C3C;
            border: 1px solid #5A5A5A;
            border-radius: 6px;
        }
        QFrame:hover {
            border-color: #5B9FFF;
        }
    """,

    # ------------------------------------------------------------------
    # Заголовок карточки задачи
    # ------------------------------------------------------------------

    "TASK_CARD_TITLE": """
        QLabel {
            font-size: 14px;
            font-weight: 600;
            color: palette(window-text);
            background-color: transparent;
        }
    """,

    "TASK_CARD_TITLE_LIGHT": """
        QLabel {
            font-size: 14px;
            font-weight: 600;
            color: #172B4D;
            background-color: transparent;
        }
    """,

    "TASK_CARD_TITLE_DARK": """
        QLabel {
            font-size: 14px;
            font-weight: 600;
            color: #F2F2F2;
            background-color: transparent;
        }
    """,

    # ------------------------------------------------------------------
    # Подпись карточки (локация, время)
    # ------------------------------------------------------------------

    "TASK_CARD_SUBTITLE": """
        QLabel {
            font-size: 12px;
            color: palette(dark);
            background-color: transparent;
        }
    """,

    "TASK_CARD_SUBTITLE_LIGHT": """
        QLabel {
            font-size: 12px;
            color: #5E6C84;
            background-color: transparent;
        }
    """,

    "TASK_CARD_SUBTITLE_DARK": """
        QLabel {
            font-size: 12px;
            color: #8C9BAB;
            background-color: transparent;
        }
    """,

    # ------------------------------------------------------------------
    # Бейдж состояния задачи
    # ------------------------------------------------------------------

    "TASK_BADGE": """
        QLabel {
            font-size: 10px;
            font-weight: 600;
            color: #FFFFFF;
            border-radius: 3px;
            min-height: 18px;
        }
    """,

    # ------------------------------------------------------------------
    # Панель фильтров над доской
    # ------------------------------------------------------------------

    "FILTER_BUTTON": """
        QPushButton {
            background-color: palette(button);
            color: palette(button-text);
            border: 1px solid palette(mid);
            font-size: 13px;
            font-weight: 500;
        }
        QPushButton:hover {
            background-color: palette(light);
        }
    """,

    "FILTER_BUTTON_LIGHT": """
        QPushButton {
            background-color: #FFFFFF;
            color: #172B4D;
            border: 1px solid #DFE1E6;
            font-size: 13px;
            font-weight: 500;
        }
        QPushButton:hover {
            background-color: #EBECF0;
        }
    """,

    "FILTER_BUTTON_DARK": """
        QPushButton {
            background-color: #3C3C3C;
            color: #F2F2F2;
            border: 1px solid #5A5A5A;
            font-size: 13px;
            font-weight: 500;
        }
        QPushButton:hover {
            background-color: #4A4A4A;
        }
    """,

    "FILTER_BUTTON_ACTIVE": """
        QPushButton {
            background-color: palette(highlight);
            color: #FFFFFF;
            border: 1px solid palette(highlight);
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
        }
        QPushButton:hover {
            background-color: #0747A6;
            border-color: #0747A6;
        }
    """,

    "FILTER_BUTTON_ACTIVE_LIGHT": """
        QPushButton {
            background-color: #0C66E4;
            color: #FFFFFF;
            border: 1px solid #0C66E4;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
        }
        QPushButton:hover {
            background-color: #0747A6;
            border-color: #0747A6;
        }
    """,

    "FILTER_BUTTON_ACTIVE_DARK": """
        QPushButton {
            background-color: #5B9FFF;
            color: #000000;
            border: 1px solid #5B9FFF;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
        }
        QPushButton:hover {
            background-color: #85B8FF;
            border-color: #85B8FF;
        }
    """,

    # ------------------------------------------------------------------
    # COM-порт статус виджет
    # ------------------------------------------------------------------

    "COM_STATUS_CONNECTED": """
        QLabel {
            font-size: 11px;
            color: #36AC87;
            background-color: transparent;
        }
    """,

    "COM_STATUS_DISCONNECTED": """
        QLabel {
            font-size: 11px;
            color: #FF5938;
            background-color: transparent;
        }
    """,

    # ------------------------------------------------------------------
    # Архив / Отчёты / Акты — общие элементы списков
    # ------------------------------------------------------------------
    "TICKET_LIST_CONTAINER": """
        QWidget {
            background-color: palette(base);
        }
    """,

    "TICKET_LIST_ITEM": """
        QWidget {
            background-color: palette(button);
            border-radius: 4px;
        }
        QWidget:hover {
            border-color: palette(highlight);
        }
    """,

    "TICKET_LIST_ITEM_SELECTED": """
        QWidget {
            background-color: palette(light);
            border-radius: 4px;
        }
    """,

    "TICKET_LIST_HEADER": """
        QLabel {
            font-size: 15px;
            font-weight: 600;
            color: palette(window-text);
            background-color: transparent;
        }
    """,

    "TICKET_LIST_TITLE": """
        QLabel {
            font-size: 13px;
            font-weight: 600;
            color: palette(window-text);
            background-color: transparent;
        }
    """,

    "TICKET_LIST_SUBTITLE": """
        QLabel {
            font-size: 12px;
            color: palette(dark);
            background-color: transparent;
        }
    """,

    "TICKET_PREVIEW_AREA": """
        QTextEdit {
            background-color: palette(base);
            color: palette(window-text);
            font-size: 13px;
        }
    """,

    "TICKET_EMPTY_LABEL": """
        QLabel {
            font-size: 14px;
            color: palette(dark);
            background-color: transparent;
        }
    """,

    "TICKET_SHELL_ROOT": """
        QWidget {
            background-color: #2B2B2B;
            border: none;
        }
    """,

    "TICKET_SURFACE_HOST": """
        QWidget {
            background-color: #2B2B2B;
            border: none;
        }
    """,

    "TICKET_SURFACE_HOST_LIGHT": """
        QWidget {
            background-color: #F4F5F7;
            border: none;
        }
    """,

    "TICKET_SHELL_ROOT_LIGHT": """
        QWidget {
            background-color: #F4F5F7;
            border: none;
        }
    """,

    "TICKET_BOARD_COLUMN_BODY": """
        QWidget {
            background-color: #FFFFFF;
            border: 1px solid #E5E7EB;
            border-radius: 0px;
        }
    """,

    "TICKET_BOARD_COLUMN_BODY_DARK": """
        QWidget {
            background-color: #2D2D2D;
            border: 1px solid #3C3C3C;
            border-radius: 0px;
        }
    """,
    
    "TICKET_BOARD_COLUMN_HEADER": """
        QWidget {
            background-color: #5A5A5A;
            border: none;
            border-radius: 0px;
        }
    """,

    "TICKET_BOARD_COLUMN_HEADER_DARK": """
        QWidget {
            background-color: #5A5A5A;
            border: none;
            border-radius: 0px;
        }
    """,

    "TICKET_BOARD_COLUMN_HEADER_LIGHT": """
        QWidget {
            background-color: #FFFFFF;
            border: none;
            border-radius: 0px;
        }
    """,

    "TICKET_BOARD_COLUMN_BODY_LIGHT": """
        QWidget {
            background-color: #FFFFFF;
            border: 1px solid #D0D7E2;
            border-radius: 0px;
        }
    """,

    "TICKET_BOARD_COLUMN_TITLE": """
        QLabel {
            background-color: transparent;
            color: #F3F4F6;
            border: none;
            font-size: 18px;
            font-weight: 500;
            qproperty-alignment: 'AlignVCenter | AlignLeft';
        }
    """,

    "TICKET_BOARD_COLUMN_TITLE_LIGHT": """
        QLabel {
            background-color: transparent;
            color: #172B4D;
            border: none;
            font-size: 18px;
            font-weight: 500;
            qproperty-alignment: 'AlignVCenter | AlignLeft';
        }
    """,

    "TICKET_BOARD_COUNTER_TEXT_WHITE": """
        QLabel {
            background-color: transparent;
            border: none;
            color: #FFFFFF;
            font-size: 18px;
            font-weight: 600;
            qproperty-alignment: 'AlignCenter';
        }
    """,

    "TICKET_BOARD_COUNTER_TEXT_MUTED": """
        QLabel {
            background-color: transparent;
            border: none;
            color: #4B5563;
            font-size: 18px;
            font-weight: 600;
            qproperty-alignment: 'AlignCenter';
        }
    """,

    "TICKET_BOARD_COUNTER_SHELL_TODO": """
        QWidget {
            background-color: #FF5938;
            border: none;
            border-radius: 999px;
        }
    """,

    "TICKET_BOARD_COUNTER_SHELL_IN_PROGRESS": """
        QWidget {
            background-color: #008BFA;
            border: none;
            border-radius: 999px;
        }
    """,

    "TICKET_BOARD_COUNTER_SHELL_CONFIRMATION": """
        QWidget {
            background-color: #FFD27A;
            border: none;
            border-radius: 999px;
        }
    """,

    "TICKET_BOARD_COUNTER_SHELL_COMPLETED": """
        QWidget {
            background-color: #36AC87;
            border: none;
            border-radius: 999px;
        }
    """,

    "TICKET_BOARD_COUNTER_SHELL_REFUSED": """
        QWidget {
            background-color: #D1D5DB;
            border: none;
            border-radius: 999px;
        }
    """,

}
