/*
 * Live Status pages (Live Interactions, Queue Status, Agent Status), the
 * person card and wallboards. Sizes measured on 016/137-142 and screenshots_2
 * #2, #15, #36, #44, #45 at the reference scale (PLAN.md §1).
 */

/* ---------------- Live Interactions ---------------- */
.live-page { padding-bottom: 38px; }
.live-filter { background: #fff; padding: 12px 22px 22px; flex: 0 0 auto; }
.live-filter .field__label { margin-bottom: 8px; }
.live-filter .select { width: 742px; }
.live-grid { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.live-page .grid-wrap .pager, .live-grid .pager { display: none; }
.live-ico { display: inline-flex; color: var(--text-secondary); vertical-align: middle; }
.live-ico svg.i { width: 18px; height: 18px; }
.grid__table th .live-ico svg.i { width: 18px; height: 18px; }
tr.row.is-selected .live-ico { color: #fff; }
.live-contact { text-decoration: underline; text-underline-offset: 3px; }
.live-info { display: inline-flex; align-items: center; gap: 2px; }
.live-info__btn { border: 0; background: none; color: inherit; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; cursor: pointer; }
.live-info__btn svg.i { width: 20px; height: 20px; }
.live-info__btn:hover { background: rgba(0, 0, 0, 0.06); }
.live-alert { color: var(--live-red); display: inline-flex; }
tr.row.is-selected .live-alert { color: #FFD3DA; }

/* details window (from the (i) button; layout from screenshots_2 #11) */
.live-details { padding: 6px 4px 4px; }
.live-details__grid { display: grid; grid-template-columns: 240px 220px 250px 1fr; gap: 0 26px; }
.live-details__f { line-height: 29px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-details__f b { font-weight: 600; }
.live-details__gone { color: var(--text-secondary); padding: 10px 0; }
.live-sentiment { margin-top: 22px; border: 1px solid #E1DFDD; padding: 10px 14px 12px; max-width: 800px; }
.live-sentiment__label { font-size: 14px; margin-bottom: 6px; }
.live-sentiment__strip { display: flex; flex-wrap: wrap; gap: 2px; background: #F3F2F1; padding: 6px 10px; min-height: 32px; }
.live-sentiment__strip span { width: 22px; height: 20px; }
.live-sentiment__phrase { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; }
.live-sentiment__phrase svg.i { width: 20px; height: 20px; }

/* ---------------- Queue Status ---------------- */
.qs { padding-bottom: 38px; }
.qs-cards { display: flex; flex-wrap: wrap; gap: 13px; max-height: 210px; overflow-y: auto; flex: 0 0 auto; margin-bottom: 26px; }
.qs-card { width: 176px; height: 96px; background: #fff; padding: 10px 12px 0 14px; cursor: pointer; user-select: none; }
.qs-card.is-selected { background: var(--accent); color: #fff; }
.qs-card__head { display: flex; align-items: center; gap: 4px; height: 20px; }
.qs-card__title { flex: 1; min-width: 0; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-card__head .toggle { flex: 0 0 auto; width: 44px; }
.qs-card__row { display: flex; justify-content: space-between; margin-top: 8px; padding-right: 2px; }
.qs-card__cell { text-align: center; }
.qs-card__label { font-size: 12px; color: var(--text-secondary); }
.qs-card.is-selected .qs-card__label { color: #fff; }
.qs-card__num { font-size: 22px; font-weight: 700; line-height: 34px; display: inline-block; min-width: 22px; position: relative; }
.qs-card__num.has-rule { padding: 0 6px; border-radius: 2px; }
.qs-card__num sup { position: absolute; top: -2px; right: -8px; font-size: 11px; font-weight: 700; line-height: 1; }
.qs-card__num.has-rule sup { right: -2px; }
.qs-tabs { display: flex; align-items: center; flex: 0 0 auto; }
.qs-tabs .tabs { margin-bottom: 0; }
.qs-tabs__name { font-size: 20px; font-weight: 700; margin-left: 20px; }
.qs-body { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 18px; }
.qs-body .pager { display: none; }
.qs-links { display: flex; gap: 4px; }
.qs-links .btn svg.i { width: 16px; height: 16px; }

/* ---------------- Agent Status ---------------- */
.as-status .select { width: 410px; }
.as-status .select__box { height: 30px; }
.grid__table tr.row.is-selected .as-status .select__box { color: var(--text); }

/* ---------------- Person card (screenshots_2 #2, #9) ---------------- */
.pcard-pop { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18); border-radius: 4px; }
.pcard { padding: 18px 10px 12px; }
.pcard__top { display: flex; gap: 20px; padding: 0 14px 4px; }
.pcard__who { font-size: 11.5px; line-height: 16px; padding-top: 6px; }
.pcard__name { font-size: 13.5px; font-weight: 700; margin-bottom: 2px; }
.pcard__label { font-weight: 700; font-size: 13px; margin: 14px 0 8px; }
.pcard__links { display: flex; flex-direction: column; }
.pcard__links a { padding: 10px 10px; border-bottom: 1px solid var(--row-line); color: var(--text); text-decoration: none; font-size: 13.5px; }
.pcard__links a:last-child { border-bottom: 0; }
.pcard__links a:hover { background: var(--row-hover); }

/* ---------------- Wallboard (030, 142, screenshots_2 #36) ---------------- */
.wb { padding-top: 40px; padding-bottom: 30px; height: auto; }
.wb-grid { display: grid; gap: 14px; align-items: stretch; }
.wb-tile { background: #D0D0D0; height: 95px; display: flex; align-items: center; justify-content: center; color: #605E5C; overflow: hidden; }
.wb-logo { background: #D0D0D0; padding: 0; }
.wb-logo img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; height: 100%; }
.wb-title { font-size: 40px; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
.wb-clock { font-size: 40px; font-weight: 400; white-space: nowrap; }
.wb-head { align-self: end; text-align: center; color: var(--text-muted); font-size: 13.5px; line-height: 20px; padding: 0 4px; min-height: 40px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: -4px; }
.wb-name { background: #EBEBEB; height: 125px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 17px; font-weight: 400; color: #605E5C; padding: 0 8px; line-height: 1.45; }
.wb-cell { height: 125px; display: flex; align-items: center; justify-content: center; font-size: 37px; font-weight: 600; white-space: nowrap; overflow: hidden; }

/* ---------------- Wallboard editor (092) ---------------- */
.wbe { max-width: var(--editor-w); }
.wbe-list { display: flex; flex-direction: column; }
.wbe-row { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--page-bg); cursor: default; }
.wbe-row.is-selected { background: var(--accent-light); }
.wbe-row.is-dragging { opacity: 0.5; }
.wbe-row__text { flex: 1; }
.wbe-row .check { flex: 1; }
.wbe-row__drag { margin-left: auto; display: inline-flex; color: var(--text-secondary); cursor: grab; }
.wbe-row__drag svg.i { width: 16px; height: 16px; }
.wbe-badge { background: var(--accent); color: #fff; font-size: 11.5px; padding: 1px 8px; border-radius: 9px; white-space: nowrap; }
.wbe-file__box { display: flex; align-items: center; height: 46px; background: #fff; padding: 0 0 0 12px; cursor: pointer; }
.wbe-file__name { flex: 1; color: var(--text-secondary); }
.wbe-file__browse { border: 0; background: transparent; height: 100%; padding: 0 16px; color: var(--text-secondary); }
.wbe-file__hint { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ---------------- Tag box ---------------- */
.tagbox__box { min-height: 37px; height: auto !important; padding-top: 3px; padding-bottom: 3px; }
.tagbox__tags { flex: 1; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.tagbox__tag { display: inline-flex; align-items: center; gap: 4px; background: #E1DFDD; padding: 2px 4px 2px 8px; border-radius: 2px; font-size: 13px; }
.tagbox__tag button { border: 0; background: none; display: inline-flex; padding: 1px; color: var(--text-secondary); cursor: pointer; }
.tagbox__ph { color: var(--text-muted); }
.tagbox__item .check { pointer-events: none; }
.dropdown-list__group { padding: 8px 12px 4px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }

/* ---------------- Agent Panel (018, 019, 020) ---------------- */
.ap-idle { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ap-idle__text { font-size: 34px; color: var(--text-secondary); border-bottom: 1px dotted var(--text-secondary); padding-bottom: 3px; }
.ap-overlay { position: fixed; inset: 0; background: rgba(37, 36, 35, 0.48); z-index: 100; }
.ap-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 404px; background: #fff; z-index: 101; padding: 0 22px; box-shadow: -1px 0 0 #6A6A9C, -4px 0 14px rgba(0, 0, 0, 0.12); }
.ap-drawer.is-pinned { box-shadow: -1px 0 0 var(--border); }
.ap-drawer__tools { display: flex; justify-content: flex-end; align-items: center; gap: 6px; height: 53px; margin-right: -12px; }
.ap-drawer__btn { width: 34px; height: 34px; border: 0; background: transparent; display: inline-flex; align-items: center; justify-content: center; color: var(--text); border-radius: 2px; }
.ap-drawer__btn:hover, .ap-drawer__close { background: #F3F2F1; }
.ap-drawer__btn svg.i { width: 18px; height: 18px; }
.ap-drawer__title { font-size: 26px; font-weight: 600; margin: 6px 0 6px; }
.ap-drawer__label { font-size: 13px; margin-bottom: 8px; }
.ap-drawer__status .select { width: 316px; }
.ap-drawer__status .select__box { background: #F3F2F1; border-color: #F3F2F1; }
.ap-drawer__time { font-size: 13px; margin: 20px 0 22px; }
.ap-queue { display: flex; align-items: center; justify-content: space-between; width: 316px; font-size: 13px; margin-bottom: 14px; }

/* ---------------- Diagnostics (123-125) ---------------- */
.diag { display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; padding: 10px 22px 22px; }
.diag .field__label { margin-bottom: 8px; }
.diag .field { margin-bottom: 4px; }
.diag__title { font-size: 26px; font-weight: 600; margin: 14px 0 10px; }
.diag__line { display: flex; align-items: center; gap: 8px; height: 46px; font-size: 14px; }
.diag__line svg.i { width: 18px; height: 18px; flex: none; }
.diag__line--ok svg.i { color: #13A10E; }
.diag__line--bad svg.i { color: #D13438; }
.diag__line--info svg.i { color: #A19F9D; }
.diag__refresh { padding: 0 22px; gap: 8px; }
.diag__refresh svg.i { width: 16px; height: 16px; }

/* ---------------- Agent Status Profiles edit (093) ---------------- */
.asp { max-width: 780px; }
.asp .check { display: flex; margin-bottom: 12px; }
.asp .color-box { max-width: 780px; }

/* ---------------- Business / Holiday Hours (085, 087) ---------------- */
.bh { max-width: 900px; }
.bh .field { max-width: 900px; }
.bh-title { display: flex; align-items: center; justify-content: space-between; font-size: 18px; font-weight: 600; margin: 4px 0 4px; max-width: 900px; }
.bh-title .link-btn { font-size: 13px; font-weight: 400; display: inline-flex; align-items: center; gap: 5px; }
.bh-title .link-btn svg.i { width: 14px; height: 14px; }
.bh-head { display: grid; grid-template-columns: 154px 166px 166px 230px; font-size: 13px; color: var(--text); margin-bottom: 10px; }
.bh-row { display: grid; grid-template-columns: 154px 166px 166px 230px 36px auto; align-items: center; min-height: 63px; }
.bh-row--closed { grid-template-columns: 154px auto; min-height: 50px; }
.bh-row__day { display: flex; align-items: center; gap: 12px; }
.bh-row__day .check { margin: 0; }
.bh-row__day b { font-weight: 600; }
.bh-closed { font-weight: 600; }
.bh-row .tbox { width: 154px; }
.bh-row .select { width: 220px; }
.bh-trash { border: 0; background: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary); }
.bh-trash svg.i { width: 16px; height: 16px; }
.bh-add { font-size: 13px; white-space: nowrap; }
.tbox { position: relative; display: flex; align-items: center; background: #fff; height: 37px; }
.tbox__input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 0 0 0 10px; font: inherit; font-size: 13.5px; height: 100%; }
.tbox__btn { border: 0; background: transparent; width: 34px; height: 100%; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.tbox__btn svg.i { width: 16px; height: 16px; }
.tbox__native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tbox__list { max-height: 260px; }
.hh-head { display: grid; grid-template-columns: 274px 274px 296px 50px; font-size: 13px; margin-bottom: 6px; }
.hh-row { display: grid; grid-template-columns: 136px 132px 136px 132px 280px 40px; gap: 6px; align-items: center; margin-bottom: 8px; }
.hh-row .tbox { width: 100%; }
.hh-add { font-size: 13px; margin: 6px 0 0; }
.inuse { margin-top: 40px; max-width: 545px; }
.inuse__title { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.inuse__head { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; border-bottom: 1px solid var(--border-strong); background: none; padding: 10px 10px 10px 2px; font-weight: 600; font-size: 13.5px; }
.inuse__head svg.i { width: 10px; height: 10px; }
.inuse__list { padding: 10px 2px; font-size: 13px; line-height: 22px; }
.inuse__group.is-closed .inuse__list { display: none; }
