/* Support101 — Bootstrap overrides + helpdesk-specific bits.
   Bootstrap 5 provides the base; this adds the sidebar tweaks and the
   status/priority badge colours. */

/* Sidebar active-link hover (dark sidebar) */
#sidebar-wrapper .list-group-item-action:hover,
#sidebar-wrapper .list-group-item-action:focus {
  background-color: #2b3035 !important;
  color: #fff !important;
}
#sidebar-wrapper .list-group-item.active-link {
  background-color: #0d6efd !important;
}
#sidebar-wrapper { min-width: 250px; }

/* Independent scrolling: sidebar and main content scroll on their own,
   the body itself does not scroll. */
#wrapper {
  height: 100vh;
  overflow: hidden;
}
#sidebar-wrapper {
  height: 100vh;
  overflow-y: auto;
}
#page-content-wrapper {
  height: 100vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  #sidebar-wrapper { min-width: 0; width: 0 !important; overflow: hidden; }
}

/* Status + priority badges (helpdesk) */
.badge.st-new { background-color: #2563eb; }
.badge.st-open { background-color: #0891b2; }
.badge.st-pending { background-color: #d97706; }
.badge.st-resolved { background-color: #059669; }
.badge.st-closed { background-color: #6b7280; }
.badge.pr-low { background-color: #94a3b8; }
.badge.pr-medium { background-color: #2563eb; }
.badge.pr-high { background-color: #ea580c; }
.badge.pr-critical { background-color: #dc2626; }

/* Ticket conversation */
.msg { border: 1px solid #dee2e6; border-radius: .5rem; padding: .85rem 1.1rem; margin-bottom: 1rem; background: #fff; }
.msg-staff { border-left: 3px solid #0d6efd; }
.msg-customer { border-left: 3px solid #94a3b8; }
.msg-note { background: #fffbeb; border-left: 3px solid #d97706; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg { scroll-margin-top: 1rem; }
/* Briefly highlight a message jumped to from the attachments list */
.msg.msg-flash { animation: msgFlash 1.6s ease-out; }
@keyframes msgFlash { 0% { box-shadow: 0 0 0 3px rgba(13,110,253,.5); } 100% { box-shadow: 0 0 0 3px rgba(13,110,253,0); } }
.att-list-row { cursor: pointer; }
.att-list-row .att-thumb { width: 40px; height: 40px; flex: 0 0 40px; }

/* Public tracking-id chip */
.tracking-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.4rem; font-weight: 700; letter-spacing: .05em;
  display: inline-block; padding: .5rem 1rem; border: 1px dashed #adb5bd; border-radius: .5rem;
}

/* KB deflection suggestions */
.kb-suggest { margin-top: .5rem; }

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* Attachment tiles + preview (v0.11.0) */
.att-tile { max-width: 260px; background: #fff; cursor: pointer; }
.att-tile:hover { background: #f8f9fa; }
.att-tile:focus-visible { outline: 2px solid #0d6efd; outline-offset: 1px; }
.att-thumb { width: 48px; height: 48px; flex: 0 0 48px; overflow: hidden; border-radius: .25rem; background: #f1f3f5; border: 1px solid #dee2e6; }
.att-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.att-thumb-icon { font-size: 1.4rem; color: #6c757d; }
.att-meta { min-width: 0; }
.att-tile .att-name { max-width: 150px; font-size: .85rem; }
.att-tile .att-size { font-size: .72rem; }
#attPreviewBody img { max-height: 70vh; }
