/*
 * «تگ‌ها» and «دسته‌های تگ» — تسک ۰۴، ۱۴۰۵/۰۷/۲۴.
 *
 * Both pages carry `fi-naming-tags-page` (ShowsNamingTagSync), and nothing
 * here reaches beyond it — except the heading line, which «لیست اشخاص»
 * shares through `fi-naming-people-page` (تسک ۰۱_۰۲، ۱۴۰۵/۰۷/۲۴). What a
 * role of «استانداردسازی نمای پنل» owns — the description's size, the yellow of «۲ دقیقه» and of the names in the table —
 * is not decided here but by the exception rows of
 * `2026_10_16_210000_the_tag_lists_read_their_names_in_yellow_under_a_smaller_description`.
 */

/* ——— The heading line (بند ۱ و ۷) ——————————————————————————————————————
 *
 * The heading on one side, the chips and the buttons on the other, on the
 * same line; the description below them across the page's whole width, so
 * the buttons no longer squeeze it. On a phone the same order stacks: the
 * heading, then the controls (wrapping onto as many lines as they need), then
 * the description.
 *
 * «لیست اشخاص» (`fi-naming-people-page`, تسک ۰۱_۰۲) takes the same line.
 */
:is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.75rem;
    align-items: center;
}

:is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header > div:first-child {
    display: contents;
}

:is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header .fi-breadcrumbs {
    grid-column: 1 / -1;
    grid-row: 1;
}

:is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header-heading {
    grid-row: 2;
}

:is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header-actions-ctn {
    grid-row: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-block-start: 0;
}

:is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header-actions-ctn > .fi-ac {
    flex-wrap: wrap;
}

:is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header-subheading {
    grid-column: 1 / -1;
    grid-row: 4;
    max-width: none;
    margin-block-start: 0;
}

@media (min-width: 1024px) {
    :is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    :is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header-heading {
        grid-column: 1;
    }

    :is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header-actions-ctn {
        grid-column: 2;
        grid-row: 2;
        justify-content: flex-end;
    }

    :is(.fi-naming-tags-page, .fi-naming-people-page) .fi-header-subheading {
        grid-row: 3;
    }
}

/* ——— The two chips (بند ۲ و ۳) ———————————————————————————————————————————
 *
 * Badges, not buttons — they report and do nothing when clicked — at the
 * buttons' height, so the line reads as one row of controls. Their colour is
 * the badge's own (success, danger or gray), chosen from the real state.
 */
.fi-naming-tags-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.fi-naming-tags-chip {
    min-height: 2.25rem;
    padding-inline: 0.75rem;
    cursor: default;
    white-space: normal;
}

/* ——— The description (بند ۴) ————————————————————————————————————————————— */
.fi-naming-tags-description,
.fi-naming-people-description {
    display: block;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

/* ——— Rows (بند ۵) ————————————————————————————————————————————————————————
 *
 * The pair «مشتریان» and «آمار فروش» already stripe with, so the panel has
 * one idea of a striped table; hover is a third tone, and the names keep
 * their yellow on all three.
 */
.fi-naming-tags-page .fi-ta-row {
    background-color: var(--agency-zebra-odd);
}

.fi-naming-tags-page .fi-ta-row.fi-striped {
    background-color: var(--agency-zebra-even, rgba(156, 163, 175, 0.14));
}

.fi-naming-tags-page .fi-ta-row:hover {
    background-color: var(--agency-zebra-hover);
}
