# -*- coding: utf-8 -*-
# gui/styles/quality_assurance_word_workspace.py
"""Стили ленты QA Word workspace.

Словарь читается сверху вниз в порядке визуальной иерархии ленты:

    1. Поверхности (ribbon surface, topbar, tab strip, group, style card).
    2. Кнопки верхней панели (badge, topbar button, topbar toggle).
    3. Вкладки (file tab, tab, tab active).
    4. Инструменты ribbon (large button, tool button).
    5. Поля ввода (combo, search).
    6. Текстовые метки (topbar text, topbar title, group title,
       style text, style caption).

Каждая пара `*_DARK` / `*_LIGHT` — две темы одного ключа, записанные
рядом. Все значения (цвета, размеры, вес, отступы) указаны прямо
в QSS-строке, без промежуточных helper-функций.
"""

QUALITY_ASSURANCE_WORD_WORKSPACE = {
    # =====================================================================
    # 1. Поверхности
    # =====================================================================

    # --- Общая поверхность ленты ----------------------------------------
    "QA_WORD_WORKSPACE_RIBBON_SURFACE_DARK": """
        QWidget {
            background-color: #1E1F21;
            border: 1px solid #2B2D31;
            border-radius: 0px;
        }
    """,
    "QA_WORD_WORKSPACE_RIBBON_SURFACE_LIGHT": """
        QWidget {
            background-color: #F4F6F8;
            border: 1px solid #D8DEE6;
            border-radius: 0px;
        }
    """,

    # --- Верхняя панель --------------------------------------------------
    "QA_WORD_WORKSPACE_TOPBAR_DARK": """
        QWidget {
            background-color: #1F2023;
            border: 1px solid #1F2023;
            border-radius: 0px;
        }
    """,
    "QA_WORD_WORKSPACE_TOPBAR_LIGHT": """
        QWidget {
            background-color: #FFFFFF;
            border: 1px solid #D6DAE1;
            border-radius: 0px;
        }
    """,

    # --- Полоса вкладок --------------------------------------------------
    "QA_WORD_WORKSPACE_TAB_STRIP_DARK": """
        QWidget {
            background-color: #242629;
            border: 1px solid #34373B;
            border-radius: 0px;
        }
    """,
    "QA_WORD_WORKSPACE_TAB_STRIP_LIGHT": """
        QWidget {
            background-color: #FFFFFF;
            border: 1px solid #D6DAE1;
            border-radius: 0px;
        }
    """,

    # --- Ribbon-группа ---------------------------------------------------
    "QA_WORD_WORKSPACE_GROUP_DARK": """
        QWidget {
            background-color: #242629;
            border: 1px solid #3A3D42;
            border-radius: 0px;
        }
    """,
    "QA_WORD_WORKSPACE_GROUP_LIGHT": """
        QWidget {
            background-color: #FFFFFF;
            border: 1px solid #D8DEE6;
            border-radius: 0px;
        }
    """,

    # --- Карточка стиля (обычная / активная) -----------------------------
    "QA_WORD_WORKSPACE_STYLE_CARD_DARK": """
        QWidget {
            background-color: #FBFBFC;
            border: 1px solid #D6DAE1;
            border-radius: 0px;
        }
    """,
    "QA_WORD_WORKSPACE_STYLE_CARD_LIGHT": """
        QWidget {
            background-color: #FFFFFF;
            border: 1px solid #D6DAE1;
            border-radius: 0px;
        }
    """,
    "QA_WORD_WORKSPACE_STYLE_CARD_ACTIVE_DARK": """
        QWidget {
            background-color: #FBFBFC;
            border: 1px solid #679B62;
            border-radius: 0px;
        }
    """,
    "QA_WORD_WORKSPACE_STYLE_CARD_ACTIVE_LIGHT": """
        QWidget {
            background-color: #FFFFFF;
            border: 1px solid #679B62;
            border-radius: 0px;
        }
    """,

    # =====================================================================
    # 2. Кнопки верхней панели
    # =====================================================================

    # --- Логотип-бейдж «W» -----------------------------------------------
    "QA_WORD_WORKSPACE_BADGE_DARK": """
        QPushButton {
            background-color: #185ABD;
            color: #FFFFFF;
            border: 1px solid #185ABD;
            border-radius: 0px;
            padding: 2px 0px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #2A6DCE; border-color: #2A6DCE; }
        QPushButton:pressed { background-color: #15499A; border-color: #15499A; }
    """,
    "QA_WORD_WORKSPACE_BADGE_LIGHT": """
        QPushButton {
            background-color: #185ABD;
            color: #FFFFFF;
            border: 1px solid #185ABD;
            border-radius: 0px;
            padding: 2px 0px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #2A6DCE; border-color: #2A6DCE; }
        QPushButton:pressed { background-color: #15499A; border-color: #15499A; }
    """,

    # --- Стандартная кнопка верхней панели (Save/Undo/Redo/окно) ---------
    "QA_WORD_WORKSPACE_TOPBAR_BUTTON_DARK": """
        QPushButton {
            background-color: #25282C;
            color: #F1F3F5;
            border: 1px solid #3C4045;
            border-radius: 0px;
            padding: 3px 6px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #33373C; border-color: #33373C; }
        QPushButton:pressed { background-color: #202327; border-color: #202327; }
    """,
    "QA_WORD_WORKSPACE_TOPBAR_BUTTON_LIGHT": """
        QPushButton {
            background-color: #FFFFFF;
            color: #243248;
            border: 1px solid #D1D8E2;
            border-radius: 0px;
            padding: 3px 6px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #EFF3F7; border-color: #EFF3F7; }
        QPushButton:pressed { background-color: #E4EAF1; border-color: #E4EAF1; }
    """,

    # --- Переключатель «On» автосохранения -------------------------------
    "QA_WORD_WORKSPACE_TOPBAR_TOGGLE_DARK": """
        QPushButton {
            background-color: #4D535A;
            color: #FFFFFF;
            border: 1px solid #4D535A;
            border-radius: 0px;
            padding: 3px 8px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #5B626A; border-color: #5B626A; }
        QPushButton:pressed { background-color: #43494F; border-color: #43494F; }
    """,
    "QA_WORD_WORKSPACE_TOPBAR_TOGGLE_LIGHT": """
        QPushButton {
            background-color: #CFD8E3;
            color: #172B4D;
            border: 1px solid #CFD8E3;
            border-radius: 0px;
            padding: 3px 8px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #DCE4ED; border-color: #DCE4ED; }
        QPushButton:pressed { background-color: #C0CCD9; border-color: #C0CCD9; }
    """,

    # =====================================================================
    # 3. Вкладки
    # =====================================================================

    # --- «Файл» (зелёная вкладка) ----------------------------------------
    "QA_WORD_WORKSPACE_FILE_TAB_DARK": """
        QPushButton {
            background-color: #2F7D32;
            color: #FFFFFF;
            border: 1px solid #2F7D32;
            border-radius: 0px;
            padding: 6px 12px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #388E3C; border-color: #388E3C; }
        QPushButton:pressed { background-color: #2B6F2D; border-color: #2B6F2D; }
    """,
    "QA_WORD_WORKSPACE_FILE_TAB_LIGHT": """
        QPushButton {
            background-color: #2F7D32;
            color: #FFFFFF;
            border: 1px solid #2F7D32;
            border-radius: 0px;
            padding: 6px 12px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #388E3C; border-color: #388E3C; }
        QPushButton:pressed { background-color: #2B6F2D; border-color: #2B6F2D; }
    """,

    # --- Обычная вкладка (Вставка / Макет / …) ---------------------------
    "QA_WORD_WORKSPACE_TAB_DARK": """
        QPushButton {
            background-color: #242629;
            color: #E7EBEF;
            border: 1px solid #242629;
            border-radius: 0px;
            padding: 6px 12px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #303338; border-color: #303338; }
        QPushButton:pressed { background-color: #23262A; border-color: #23262A; }
    """,
    "QA_WORD_WORKSPACE_TAB_LIGHT": """
        QPushButton {
            background-color: #FFFFFF;
            color: #243248;
            border: 1px solid #E6EBF1;
            border-radius: 0px;
            padding: 6px 12px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #F0F4F8; border-color: #F0F4F8; }
        QPushButton:pressed { background-color: #DCE4ED; border-color: #DCE4ED; }
    """,

    # --- Активная вкладка («Главная») ------------------------------------
    "QA_WORD_WORKSPACE_TAB_ACTIVE_DARK": """
        QPushButton {
            background-color: #2F3237;
            color: #FFFFFF;
            border: 1px solid #4E535A;
            border-radius: 0px;
            padding: 6px 12px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #383D43; border-color: #383D43; }
        QPushButton:pressed { background-color: #292D31; border-color: #292D31; }
    """,
    "QA_WORD_WORKSPACE_TAB_ACTIVE_LIGHT": """
        QPushButton {
            background-color: #FFFFFF;
            color: #172B4D;
            border: 1px solid #C7D1DD;
            border-radius: 0px;
            padding: 6px 12px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 700;
        }
        QPushButton:hover   { background-color: #F6F8FB; border-color: #F6F8FB; }
        QPushButton:pressed { background-color: #E8EDF3; border-color: #E8EDF3; }
    """,

    # =====================================================================
    # 4. Инструменты ribbon
    # =====================================================================

    # --- Крупная кнопка группы («Вставить», «Сетка») ---------------------
    "QA_WORD_WORKSPACE_LARGE_BUTTON_DARK": """
        QPushButton {
            background-color: #2A2E33;
            color: #F1F3F5;
            border: 1px solid #40454B;
            border-radius: 0px;
            padding: 6px 8px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #34393F; border-color: #34393F; }
        QPushButton:pressed { background-color: #25292D; border-color: #25292D; }
    """,
    "QA_WORD_WORKSPACE_LARGE_BUTTON_LIGHT": """
        QPushButton {
            background-color: #F8FAFC;
            color: #172B4D;
            border: 1px solid #D2DAE5;
            border-radius: 0px;
            padding: 6px 8px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #EFF3F7; border-color: #EFF3F7; }
        QPushButton:pressed { background-color: #E6ECF3; border-color: #E6ECF3; }
    """,

    # --- Мелкая инструментальная кнопка (B/I/U, L/C/R/J, «Найти» и т. п.)
    "QA_WORD_WORKSPACE_TOOL_BUTTON_DARK": """
        QPushButton {
            background-color: #25282C;
            color: #F1F3F5;
            border: 1px solid #3A3E43;
            border-radius: 0px;
            padding: 4px 6px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #30353A; border-color: #30353A; }
        QPushButton:pressed { background-color: #23272B; border-color: #23272B; }
    """,
    "QA_WORD_WORKSPACE_TOOL_BUTTON_LIGHT": """
        QPushButton {
            background-color: #FFFFFF;
            color: #243248;
            border: 1px solid #D1D8E2;
            border-radius: 0px;
            padding: 4px 6px;
            font-family: 'Segoe UI';
            font-size: 11px;
            font-weight: 600;
        }
        QPushButton:hover   { background-color: #EFF3F7; border-color: #EFF3F7; }
        QPushButton:pressed { background-color: #E4EAF1; border-color: #E4EAF1; }
    """,

    # =====================================================================
    # 5. Поля ввода
    # =====================================================================

    # --- Выпадающий список ribbon ----------------------------------------
    "QA_WORD_WORKSPACE_COMBO_DARK": """
        QComboBox {
            background-color: #25282C;
            color: #F1F3F5;
            border: 1px solid #3A3E43;
            border-radius: 0px;
            padding: 2px 6px;
            font-family: 'Segoe UI';
            font-size: 11px;
            combobox-popup: 0;
        }
        QComboBox:focus {
            border: 1px solid #5B9BD5;
        }
        QComboBox QAbstractItemView {
            background-color: #25282C;
            color: #F1F3F5;
            border: 1px solid #3A3E43;
            selection-background-color: #5B9BD5;
            selection-color: #FFFFFF;
        }
    """,
    "QA_WORD_WORKSPACE_COMBO_LIGHT": """
        QComboBox {
            background-color: #FFFFFF;
            color: #243248;
            border: 1px solid #D1D8E2;
            border-radius: 0px;
            padding: 2px 6px;
            font-family: 'Segoe UI';
            font-size: 11px;
            combobox-popup: 0;
        }
        QComboBox:focus {
            border: 1px solid #0C66E4;
        }
        QComboBox QAbstractItemView {
            background-color: #FFFFFF;
            color: #243248;
            border: 1px solid #D1D8E2;
            selection-background-color: #0C66E4;
            selection-color: #FFFFFF;
        }
    """,

    # --- Поле поиска верхней панели --------------------------------------
    "QA_WORD_WORKSPACE_SEARCH_DARK": """
        QLineEdit {
            background-color: #2A2D32;
            color: #F1F3F5;
            border: 1px solid #3D4248;
            border-radius: 0px;
            padding: 4px 10px;
            font-family: 'Segoe UI';
            font-size: 12px;
        }
        QLineEdit:focus {
            border: 1px solid #5B9BD5;
        }
        QLineEdit::placeholder {
            color: #9CA7B5;
        }
    """,
    "QA_WORD_WORKSPACE_SEARCH_LIGHT": """
        QLineEdit {
            background-color: #FFFFFF;
            color: #172B4D;
            border: 1px solid #CDD6E1;
            border-radius: 0px;
            padding: 4px 10px;
            font-family: 'Segoe UI';
            font-size: 12px;
        }
        QLineEdit:focus {
            border: 1px solid #0C66E4;
        }
        QLineEdit::placeholder {
            color: #6B778C;
        }
    """,

    # =====================================================================
    # 6. Текстовые метки
    # =====================================================================

    # --- Надпись «Автосохранение» в верхней панели -----------------------
    "QA_WORD_WORKSPACE_TOPBAR_TEXT_DARK": """
        QLabel {
            color: #E7EBEF;
            background-color: transparent;
            border: none;
            padding: 0px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 600;
            qproperty-alignment: 'AlignCenter';
        }
    """,
    "QA_WORD_WORKSPACE_TOPBAR_TEXT_LIGHT": """
        QLabel {
            color: #243248;
            background-color: transparent;
            border: none;
            padding: 0px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 600;
            qproperty-alignment: 'AlignCenter';
        }
    """,

    # --- Заголовок документа в верхней панели ----------------------------
    "QA_WORD_WORKSPACE_TOPBAR_TITLE_DARK": """
        QLabel {
            color: #FFFFFF;
            background-color: transparent;
            border: none;
            padding: 0px 8px;
            font-family: 'Segoe UI';
            font-size: 13px;
            font-weight: 600;
            qproperty-alignment: 'AlignCenter';
        }
    """,
    "QA_WORD_WORKSPACE_TOPBAR_TITLE_LIGHT": """
        QLabel {
            color: #172B4D;
            background-color: transparent;
            border: none;
            padding: 0px 8px;
            font-family: 'Segoe UI';
            font-size: 13px;
            font-weight: 600;
            qproperty-alignment: 'AlignCenter';
        }
    """,

    # --- Заголовок ribbon-группы («Буфер обмена», «Шрифт», …) ------------
    "QA_WORD_WORKSPACE_GROUP_TITLE_DARK": """
        QLabel {
            color: #E7EBEF;
            background-color: transparent;
            border: none;
            padding: 0px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 700;
            qproperty-alignment: 'AlignCenter';
        }
    """,
    "QA_WORD_WORKSPACE_GROUP_TITLE_LIGHT": """
        QLabel {
            color: #243248;
            background-color: transparent;
            border: none;
            padding: 0px;
            font-family: 'Segoe UI';
            font-size: 12px;
            font-weight: 700;
            qproperty-alignment: 'AlignCenter';
        }
    """,

    # --- Основной текст карточки стиля ----------------------------------
    "QA_WORD_WORKSPACE_STYLE_TEXT_DARK": """
        QLabel {
            color: #172B4D;
            background-color: transparent;
            border: none;
            padding: 4px 6px 0px 6px;
            font-family: 'Segoe UI';
            font-size: 14px;
            font-weight: 700;
            qproperty-alignment: 'AlignLeft | AlignTop';
        }
    """,
    "QA_WORD_WORKSPACE_STYLE_TEXT_LIGHT": """
        QLabel {
            color: #172B4D;
            background-color: transparent;
            border: none;
            padding: 4px 6px 0px 6px;
            font-family: 'Segoe UI';
            font-size: 14px;
            font-weight: 700;
            qproperty-alignment: 'AlignLeft | AlignTop';
        }
    """,

    # --- Подпись карточки стиля («Обычный», «Заголовок 1», …) ------------
    "QA_WORD_WORKSPACE_STYLE_CAPTION_DARK": """
        QLabel {
            color: #4F5B6B;
            background-color: transparent;
            border: none;
            padding: 0px 6px 4px 6px;
            font-family: 'Segoe UI';
            font-size: 10px;
            font-weight: 600;
            qproperty-alignment: 'AlignLeft | AlignTop';
        }
    """,
    "QA_WORD_WORKSPACE_STYLE_CAPTION_LIGHT": """
        QLabel {
            color: #4F5B6B;
            background-color: transparent;
            border: none;
            padding: 0px 6px 4px 6px;
            font-family: 'Segoe UI';
            font-size: 10px;
            font-weight: 600;
            qproperty-alignment: 'AlignLeft | AlignTop';
        }
    """,
}
