/* Tharsol Connect: Home's blocks (staff /home and clients' /support), the rows, chips and the Customize list. Namespaced
   (.hm-*, .hcz-*), Connect's tokens only, so the same in light and dark and inside the ticket screens' layout. */

.hm-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13.5px;
}

.hm-empty {
    margin: 2px 0 6px;
    color: var(--muted);
    font-size: 13.5px;
}

.hm-foot {
    margin: 8px 0 0;
    color: var(--faint);
    font-size: 12.5px;
}

    .hm-foot a {
        color: var(--accent);
    }

.hm-sub {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 14px 0 6px;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

    .hm-sub.first {
        margin-top: 0;
    }

    .hm-sub .icon {
        width: 15px;
        height: 15px;
    }

.hm-more {
    margin-left: auto;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

    .hm-more:hover {
        text-decoration: underline;
    }

.hm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.hm-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 8px;
    margin: 0 -8px;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
}

    .hm-row:hover,
    .hm-row:focus-visible {
        background: var(--hover);
    }

.hm-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.hm-who,
.hm-what,
.hm-why {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-who {
    font-size: 13.5px;
    font-weight: 600;
}

.hm-what {
    font-size: 13px;
    color: var(--muted);
}

.hm-why {
    font-size: 12.5px;
    color: var(--warn);
}

.hm-num {
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-weight: 600;
    color: var(--muted);
}

.hm-imp {
    color: var(--danger);
    font-weight: 800;
    margin-right: 4px;
}

.hm-when,
.hm-time {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--faint);
    white-space: nowrap;
}

.hm-time {
    width: 62px;
    color: var(--muted);
    font-weight: 600;
}

.hm-side {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tinted chips: a soft fill, the colour's text and a 1px border (never solid). */
.hm-chip {
    --c: var(--muted);
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
    background: color-mix(in srgb, var(--c) 12%, transparent);
    color: var(--c);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

    .hm-chip.sm {
        height: 19px;
        padding: 0 7px;
        font-size: 11.5px;
    }

    .hm-chip.accent {
        --c: var(--accent);
    }

    .hm-chip.warn {
        --c: var(--warn);
    }

    .hm-chip.danger {
        --c: var(--danger);
    }

    .hm-chip.ok {
        --c: var(--ok);
    }

    .hm-chip.info {
        --c: #6d4fd1;
    }

:root[data-theme="dark"] .hm-chip.info {
    --c: #b4a2ff;
}

/* A ticket status in its own colour (the ticket list's chip, tinted). */
.hm-status {
    display: inline-block;
    max-width: 150px;
    height: 20px;
    line-height: 18px;
    padding: 0 8px;
    border-radius: 6px;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
    background: color-mix(in srgb, var(--c) 14%, transparent);
    color: color-mix(in srgb, var(--c) 78%, #10151C);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

:root[data-theme="dark"] .hm-status {
    background: color-mix(in srgb, var(--c) 22%, transparent);
    border-color: color-mix(in srgb, var(--c) 55%, transparent);
    color: color-mix(in srgb, var(--c) 55%, #FFFFFF);
}

/* ---- Customize (Home's panel, Settings → Home) ------------------------------------------------------------------ */

.hcz-h {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin-bottom: 10px;
    color: var(--text);
}

.hcz-hint {
    color: var(--muted);
    font-size: 13px;
}

.hcz-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 520px;
}

.hcz-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
}

    .hcz-item.off .hcz-name {
        color: var(--faint);
        text-decoration: line-through;
    }

.hcz-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    font-size: 13.5px;
}

.hcz-chip,
.hcz-mv,
.hcz-reset,
.hcz-done {
    height: 28px;
    border-radius: 7px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.hcz-chip {
    min-width: 72px;
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
    background: transparent;
    color: var(--muted);
}

    .hcz-chip[aria-pressed="true"] {
        border-color: color-mix(in srgb, var(--accent) 45%, transparent);
        background: color-mix(in srgb, var(--accent) 12%, transparent);
        color: var(--accent);
    }

.hcz-mv {
    width: 30px;
    padding: 0;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

    .hcz-mv:disabled {
        opacity: .35;
        cursor: default;
    }

.hcz-f {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.hcz-reset {
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

.hcz-done {
    padding: 0 14px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
}

.hcz-live {
    color: var(--muted);
    font-size: 12.5px;
}

.hcz-err {
    margin: 8px 0 0;
    color: var(--danger);
    font-size: 13px;
}

/* A block that couldn't load (or took too long): its message and "Try again" (HomeLoad, and HomeCard's ErrorBoundary). */
.hc-fail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 9px 12px;
    border-radius: 9px;
    border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
    background: color-mix(in srgb, var(--danger) 10%, transparent);
    color: var(--danger);
    font-size: 13px;
}

.hc-retry {
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    border-radius: 7px;
    padding: 3px 10px;
    min-height: 32px;
    cursor: pointer;
}

@media (pointer: coarse) {
    .hc-retry {
        min-height: 44px;
        padding: 0 14px;
    }
}

/* Clients needing care: the suggested next step under each row (Draft reply / Fix tone). */
.hm-next {
    display: inline-block;
    margin: -2px 0 4px;
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
}

    .hm-next:hover {
        text-decoration: underline;
    }
