/*
 * Shared "card with colored header icon + pill table" styling — first built
 * for Customer 360's Services & Tickets tab, now reused anywhere a list
 * screen needs an icon-badge card header, a colored table header bar, and
 * status/priority pills. Class prefix "svctix" (services & tickets) is kept
 * for continuity even though usage has since spread beyond that one screen.
 */
.svctix-icon-badge {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.svctix-icon-blue { background: #eaf1fd; color: #2f5adf; }
.svctix-icon-red { background: #fdeced; color: #e5344a; }

.svctix-card {
    background: #ffffff;
    border: 1px solid #e8e9ea;
    border-radius: 12px;
    overflow: hidden;
}
.svctix-card .card-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f2f3;
    padding: 16px 18px;
}
.svctix-card .card-header h5 {
    font-size: 15px;
    font-weight: 700;
    color: #1a2438;
}

.svctix-btn-primary {
    background: #2f5adf;
    border-color: #2f5adf;
    color: #fff;
    font-weight: 600;
}
.svctix-btn-primary:hover,
.svctix-btn-primary:focus {
    background: #274bc0;
    border-color: #274bc0;
    color: #fff;
}

.svctix-table thead th {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: .02em;
    white-space: nowrap;
    padding: 11px 14px;
    border-bottom: 0;
}
.svctix-table tbody td {
    padding: 14px;
    color: #3d4863;
    vertical-align: middle;
}
.svctix-table-blue thead tr { background: #eaf1fd; border-bottom: 1px solid #d7e6fb; }
.svctix-table-blue thead th { color: #2f5adf; }
.svctix-table-red thead tr { background: #fdeced; border-bottom: 1px solid #fad4d8; }
.svctix-table-red thead th { color: #e5344a; }

/* Aligns a table-sm's first/last column text with the 20px card-header/
   toolbar gutter above it — table-sm's own cell padding (0.3rem) otherwise
   sits ~15px further in from the card edge than the header/toolbar text. */
.svctix-table-gutter thead th:first-child,
.svctix-table-gutter tbody td:first-child {
    padding-left: 20px;
}
.svctix-table-gutter thead th:last-child,
.svctix-table-gutter tbody td:last-child {
    padding-right: 20px;
}

.svctix-toggle-btn {
    width: 26px; height: 26px;
    border-radius: 7px;
    border: 1px solid #e2e5eb;
    background: #ffffff;
    color: #8a94a6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
}
.svctix-toggle-btn[aria-expanded="true"] {
    background: #eaf1fd;
    color: #2f5adf;
    border-color: #cddffb;
}

.svctix-network-panel {
    padding: 0 !important;
    background: linear-gradient(135deg, #eef4fd, #f6f1fb);
    border-bottom: 1px solid #f1f2f3;
}
.svctix-network-panel > * {
    padding: 18px 18px 20px 40px;
}
.svctix-network-title {
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    color: #8a94a6;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 16px;
}
.svctix-network-title i { color: #2f5adf; font-size: 14px; }
.svctix-network-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    row-gap: 18px;
    column-gap: 20px;
}
@media (max-width: 991px) {
    .svctix-network-grid { grid-template-columns: repeat(2, 1fr); }
}
.svctix-network-label { font-size: 11.5px; color: #8a94a6; }
.svctix-network-value { font-weight: 700; color: #1a2438; font-size: 13.5px; margin-top: 2px; }

.svctix-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    padding: 4px 12px;
    white-space: nowrap;
}
.svctix-pill-green { background: #e7f8ee; color: #1a9a52; }
.svctix-pill-red { background: #fdeced; color: #e5344a; }
.svctix-pill-blue { background: #eaf1fd; color: #2f5adf; }
.svctix-pill-orange { background: #fdf1e5; color: #d4831f; }
.svctix-pill-gray { background: #f3f4f6; color: #67748e; }

.svctix-ticket-id { color: #2f5adf; font-weight: 700; }

.svctix-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 28px;
    border: 1px solid #d8dee8;
    background: #fff;
    border-radius: 7px;
    color: #2f5adf;
}
.svctix-action-btn:hover {
    background: #f4f6fb;
    color: #2f5adf;
    text-decoration: none;
}

/* Per-escalation-level chips on the ticket list's SLA column — colors
   match the existing .dotactive .ok/.critical/.breached SLA dot exactly
   (#229954/#f5b041/#dc3545) so both indicators read as the same signal. */
.svctix-sla-chip-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}
.svctix-sla-chip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.6;
    color: #fff;
}
.svctix-sla-chip-ok { background: #229954; }
.svctix-sla-chip-critical { background: #f5b041; color: #3a2a00; }
.svctix-sla-chip-breached { background: #dc3545; }
/* Ran out of levels to escalate to (breached_status 4) -- darker than a
   plain breach and outlined so it reads as more severe, not just "another
   red chip", at a glance in the list. */
.svctix-sla-chip-fullybreached {
    background: #7a0c1c;
    box-shadow: 0 0 0 1px #ffb3bb inset;
}

/* Matches the app's existing .dotactive .ok/.critical/.breached SLA dot
   (public/assets/css/style.css) -- adds the 4th, "ran out of levels"
   state those don't have a color for. */
.dotactive.fullybreached { background: #7a0c1c; }

/* public/js/table-pagination.js — rows off the current page or excluded by
   a filter are hidden via these classes rather than inline style, so the
   two mechanisms never fight over the same style.display property. */
.pg-hidden-page, .pg-filtered { display: none !important; }
