/* ==========================================================================
   TASK QUEUES  (assets/css/task-queues.css) - task-queues.php
   Builds on data-tools.css (dt-*, rr-usel*). HubSpot /task-queues/ layout.
   ========================================================================== */
.tq-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin: 20px 0 16px; }
.tq-search { width: min(240px, 100%); }
.tq-by { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.tq-by__lbl { font-weight: 600; }
.tq-by .rr-usel__btn { font-weight: 700; }
.tq-table .dt-table th:first-child,
.tq-table .dt-table td:first-child { width: 48px; }
.tq-name { font-weight: 600; }
.tq-access small { display: block; color: var(--text-muted); font-size: 12.5px; }
.tq-rowact { display: inline-flex; gap: 6px; margin-left: 12px; opacity: 0; transition: opacity .12s ease; }
.tq-table tr:hover .tq-rowact,
.tq-table tr:focus-within .tq-rowact { opacity: 1; }
.tq-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 16px; color: var(--text); text-align: center; font-size: 14px; }
.tq-empty svg { width: 160px; height: 140px; color: var(--text-subtle); }
.tq-selbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 14px; }

.tq-by { position: relative; }
.tq-by .rr-usel__opt { flex-direction: column; align-items: flex-start; gap: 2px; }
.tq-by .rr-usel__opt small { color: var(--text-muted); font-size: 12.5px; font-weight: 400; }

/* ---------------------------------------------------- Create / Edit queue
   HubSpot dialog: big title, dark-outlined fields, description under Access
   type, chip field for users, pill buttons left-aligned.                  */
.dt-modal.dt-modal--tq { width: 500px; border-radius: 16px; }
.dt-modal--tq .dt-modal__head { padding: 22px 32px 20px 40px; }
.dt-modal--tq .dt-modal__head h2 { font-size: 22px; font-weight: 600; }
.dt-modal--tq .dt-modal__body { padding: 28px 40px 4px; overflow: visible; }
.dt-modal--tq .dt-modal__foot { justify-content: flex-start; gap: 12px; padding: 16px 40px 28px; border-top: 0; }
.dt-modal--tq .dt-btn { height: 40px; padding: 0 22px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.dt-modal--tq .dt-btn--primary[disabled] { border-color: var(--surface-3); background: var(--surface-3); color: var(--text-subtle); opacity: 1; }
.dt-modal--tq .tq-cancel { border: 1px solid var(--text); background: var(--surface); color: var(--text); }
.dt-modal--tq .tq-cancel:hover { background: var(--surface-hover); }

.tq-f { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.tq-f[hidden] { display: none; }
.tq-f__lbl { font-size: 14px; font-weight: 600; color: var(--text); }
.tq-f__hint { margin: 2px 0 0; font-size: 14px; color: var(--text); }
.tq-f__hint[hidden] { display: none; }

.tq-in,
.tq-dd {
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--text);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}
.tq-in:focus, .tq-dd:focus-visible, .tq-dd[aria-expanded="true"] { outline: 0; border-color: var(--brand); box-shadow: var(--focus-ring); }
.tq-in[aria-invalid="true"] { border-color: var(--danger); }
.tq-dd { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.tq-dd.is-placeholder { color: var(--text-muted); }
.tq-caret { flex: 0 0 auto; width: 11px; height: 7px; color: var(--text); }

/* users chip field */
.tq-multi { padding: 6px 14px 6px 8px; }
.tq-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.tq-ph { padding-left: 6px; color: var(--text-muted); }
.tq-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 6px 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--surface-3);
    font-size: 14px;
    white-space: nowrap;
}
.tq-chip__x { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--text); cursor: pointer; }
.tq-chip__x:hover { background: var(--surface-hover); }
.tq-chip__x svg { width: 12px; height: 12px; }

/* dropdowns (DT.pop) */
.dt-pop.tq-pop { padding: 6px 0; border-color: var(--border-strong); border-radius: 10px; }
.tq-opt.dt-menu__item { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 0; }
.tq-opt b { font-size: 14.5px; font-weight: 500; }
.tq-opt small { color: var(--text-muted); font-size: 12.5px; }
.tq-opt[aria-selected="true"] { background: var(--surface-2); }
.tq-opt[aria-selected="true"]::after { content: none; }

.dt-pop.tq-pop--users { display: flex; flex-direction: column; max-height: min(380px, calc(100vh - 24px)); overflow: hidden; padding: 0; background: var(--surface-2); }
.tq-psearch { position: relative; display: block; margin: 12px; }
.tq-psearch input {
    width: 100%;
    height: 42px;
    padding: 0 42px 0 18px;
    border: 1px solid var(--text-muted);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}
.tq-psearch input:focus { outline: 0; border-color: var(--brand); box-shadow: var(--focus-ring); }
.tq-psearch svg { position: absolute; right: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.tq-ulist { flex: 1; overflow-y: auto; background: var(--surface); scrollbar-width: thin; }
.tq-uopt { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px 16px; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.tq-uopt:hover, .tq-uopt:focus-visible { background: var(--surface-hover); outline: 0; }
.tq-uopt.is-on { background: var(--surface-2); }
.tq-box { flex: 0 0 auto; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--text-muted); border-radius: 5px; background: var(--surface); color: transparent; }
.tq-box svg { width: 15px; height: 15px; }
.tq-uopt.is-on .tq-box { border-color: var(--text); color: var(--text); }
.tq-uopt__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tq-uopt__txt b { font-size: 15px; font-weight: 500; }
.tq-uopt__txt small { color: var(--text-muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tq-none { margin: 0; padding: 14px 16px; color: var(--text-muted); font-size: 14px; }

[data-theme="dark"] .dt-modal.dt-modal--tq,
[data-theme="dark"] .dt-modal--tq .dt-modal__head,
[data-theme="dark"] .dt-modal--tq .dt-modal__foot { background: var(--surface); color: var(--text); }
[data-theme="dark"] .dt-modal--tq .dt-modal__head h2 { color: var(--text); }
@media (max-width: 520px) {
    .dt-modal--tq .dt-modal__head, .dt-modal--tq .dt-modal__body, .dt-modal--tq .dt-modal__foot { padding-left: 20px; padding-right: 20px; }
}
