/**
 * HESK — Legal Entity (ЮЛ) / 3-я линия (DataPro Support) customization styles
 * Added 01.07.2026 per ТЗ "Функционал обработки заявок от юридических лиц"
 * Extended 09.07.2026 per ТЗ "Функционал обработки специальных заявок в HESK: 3 линия"
 *
 * Covers: ticket list row highlight, "ЮЛ"/"3 линия" badges (list + ticket
 * card + sidebar widget), left sidebar notification widget.
 *
 * Per ТЗ, "3 линия" rows/badges reuse the same visual style as "ЮЛ" —
 * only the badge text differs, so both share the same CSS rules below.
 */

/* ---- Ticket list: legal entity / line3 row highlight ---- */
tr.legal-entity-row,
tr.line3-row {
    box-shadow: inset 3px 0 0 0 #e64342;
    background-color: rgba(230, 67, 66, 0.05);
}

tr.legal-entity-row:hover,
tr.line3-row:hover {
    background-color: rgba(230, 67, 66, 0.1);
}

/* ---- "ЮЛ" / "3 линия" badge (ticket list + ticket card + widget) ---- */
.legal-entity-badge,
.line3-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 6px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    color: #fff;
    background-color: #e64342;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* ---- Left sidebar notification widget ---- */
.legal-entity-widget {
    margin: 12px 12px 16px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    /* 07.07.2026: .main-menu is a flex item without a fixed width, so it is
       sized by the max-content of its children. A long ticket subject inside
       the widget was inflating that intrinsic width and stretching the whole
       sidebar. inline-size containment removes the widget's content from the
       sidebar width calculation: the sidebar stays sized by the menu items
       and the widget simply fills the available width. */
    contain: inline-size;
    min-width: 0;
}

.legal-entity-widget__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 10px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.85);
}

.legal-entity-widget__header .icon {
    fill: rgba(255, 255, 255, 0.6);
}

.legal-entity-widget__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex: 1 1 auto;
}

.legal-entity-widget__count {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background-color: #e64342;
    border-radius: 10px;
}

.legal-entity-widget__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.legal-entity-widget__close:hover {
    color: #fff;
}

.legal-entity-widget__list {
    list-style: none;
    margin: 0;
    padding: 0 10px 10px;
}

.legal-entity-widget__list li {
    padding: 6px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-entity-widget__list li:first-child {
    border-top: none;
}

.legal-entity-widget__list a {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    /* 07.07.2026: long subjects wrap onto extra lines instead of being cut
       (was nowrap + ellipsis) and never widen the sidebar. */
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.legal-entity-widget__list a:hover {
    color: #fff;
    text-decoration: underline;
}

.legal-entity-widget__list a .track {
    color: #ff8a89;
    font-weight: 700;
    margin-right: 4px;
}

/* 09.07.2026: per-row type badge ("ЮЛ" / "3 линия") inside the combined
   widget list — sits before the #id/track so the type is scannable at a
   glance without opening the ticket. Reuses .legal-entity-badge/.line3-badge
   colors, just tightened margins for the inline widget context. */
.legal-entity-widget__list a .widget-type-badge {
    margin-left: 0;
    margin-right: 6px;
}
