/*****************************************************************
 * File Name   : helpdesk.css
 * Developer   : Farhan Akhtar
 * Module      : Helpdesk UI Stylesheet
 * Last Modified on : 11-02-2026
 * Description : Master stylesheet for helpdesk ticket system
 *****************************************************************/

/* =========================
   1. GENERIC BADGES & DOTS
========================= */

.dot {
  height: 8px;
  width: 7px;
  background-color: #d91d1d;
  border-radius: 50%;
  display: table;
  float: left;
}

.img_priorty {
  height: 17px;
  width: 17px;
}

.fil_div {
  width: 20px;
  height: 20px;
  border: 1px solid #999999;
  border-radius: 5px;
}

/* Status color blocks */
.pending   { background: crimson;  margin-left: -28px; }
.resolved  { background: #e1ba02; margin-left: -24px; }
.closed    { background: #00A36C; margin-left: -37px; }
.escalated { background: #FFBF00; margin-left: -17px; }
.priority  { background: #CFB53B; margin-left: -29px; }
.non_priority { background: cadetblue; margin-left: -33px; }

/* =========================
   2. DELETE BUTTON & POPUP
========================= */

.delete-btn {
  background-color: #ff4d4d;
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 5px;
}

.delete-btn:hover {
  background-color: #cc0000;
}

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-contents {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 377px;
  text-align: center;
  margin: 73px auto 0;
}

.popup-contents h3 {
  margin: 0 0 10px 0;
}

.popup-contents textarea {
  width: 100%;
  height: 70px;
  margin-bottom: 15px;
  padding: 5px;
  resize: none;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
}

.confirm-btn,
.cancel-btn {
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #fff;
}

.confirm-btn {
  background-color: #4caf50;
}

.confirm-btn:hover {
  background-color: #45a049;
}

.cancel-btn {
  background-color: #f44336;
}

.cancel-btn:hover {
  background-color: #d32f2f;
}

/* =========================
   3. HEADER & STATUS LEGEND
========================= */

.breadcrumb_head_new {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid #d9d0d0;
  border-top: 2px solid #228B22;
  background-color: #fafafa;
  padding: 6px 10px;
  display: block;
  width: 100%;
  box-shadow: inset 0 -1px 0 #ddd;
}

.status-legend {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.status-item:hover {
  background: #e8f5e9;
  border-color: #2e7d32;
}

.status-item.active {
  background: #e8f5e9;
  border-color: #2e7d32;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.status-label {
  color: #333;
}

.status-item:hover .status-label,
.status-item.active .status-label {
  color: #1b5e20;
  font-weight: 600;
}

.status-color {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #999;
  display: inline-block;
}

/* =========================
   4. GLOBAL OVERLAY
========================= */

.assign-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* =========================
   5. DATATABLES STYLING
========================= */

.dataTables_wrapper .dt-buttons {
  float: right;
  margin: 4px 0 8px 0;
}

.dataTables_wrapper::after {
  content: "";
  display: block;
  clear: both;
}

.dataTables_wrapper .dt-button,
div.dt-buttons .dt-button {
  background: #f5f6f8;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1;
  box-shadow: none;
  margin-left: 6px;
}

.dataTables_wrapper .dt-button:hover,
div.dt-buttons .dt-button:hover,
div.dt-buttons .dt-button:focus {
  background: #e9ecef;
  border-color: #bfc6ce;
}

.dt-button i,
div.dt-buttons .dt-button i {
  font-size: 16px;
  line-height: 1;
  vertical-align: middle;
  display: inline-block;
}

div.dt-buttons .dt-button span {
  display: inline-block;
  line-height: 1;
}

#customer_data td,
#customer_data th {
  vertical-align: middle;
}

#customer_data td:last-child,
#customer_data th:last-child {
  white-space: nowrap;
  text-align: center;
  width: 120px;
}

#customer_data td:nth-last-child(2),
#customer_data th:nth-last-child(2) {
  width: 140px;
  text-align: center;
}

#customer_data td:nth-child(2),
#customer_data th:nth-child(2) {
  width: 160px;
  white-space: nowrap;
}

#customer_data td:first-child,
#customer_data th:first-child {
  width: 40px;
  text-align: center;
}

#remarkPopup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#remarkPopup > div {
  background: #fff;
  max-width: 480px;
  width: 90vw;
  margin: 20px;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}

#remarkPopup h5 {
  margin: 0;
}

#remarkPopupText {
  white-space: pre-wrap;
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #1f7437;
}

#customer_data .remark-icon {
  opacity: .7;
  transition: opacity .2s;
  padding: 4px;
  border-radius: 4px;
}

#customer_data .remark-icon:hover {
  opacity: 1;
  background: #e3f2fd;
}



/* =========================
   6. ASSIGN TICKETS MODAL
========================= */

.assign-modal {
  background: #ffffff;
  width: 420px;
  max-width: 95%;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  padding: 24px 28px;
}

.assign-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: #333;
}

.assign-count {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.assign-field {
  margin-bottom: 22px;
}

.assign-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

#agent_select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#agent_select:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46,125,50,0.18);
}

#agent_select:disabled {
  background: linear-gradient(90deg, #f0f0f0 30%, #e0e0e0 50%, #f0f0f0 70%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.assign-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn {
  min-width: 70px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #fff;
  line-height: 1.2;
  transition: all 0.2s;
}

.btn-success {
  background: #2e7d32;
}

.btn-success:hover {
  background: #256628;
  box-shadow: 0 4px 12px rgba(46,125,50,0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: #d32f2f;
}

.btn-danger:hover {
  background: #b52828;
  box-shadow: 0 4px 12px rgba(211,47,47,0.4);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}

.btn-edit {
  background: #1565c0;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-edit:hover {
  background: #0d47a1;
}

.btn-delete {
  background: #d32f2f;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: #b71c1c;
}

.btn-secondary {
  background: #757575;
  color: #fff;
}

.btn-secondary:hover {
  background: #616161;
}

.btn-primary {
  background: #1565c0;
  color: #fff;
}

.btn-primary:hover {
  background: #0d47a1;
  box-shadow: 0 4px 12px rgba(46,125,50,0.4);
  transform: translateY(-1px);
}

/* =========================
   7. ASSIGN FILTER CHIPS
========================= */

.assign-filter-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.assign-chip {
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f3f5;
  color: #444;
  border: 1px solid #d0d7de;
  cursor: pointer;
  line-height: 1;
}

.assign-chip:hover {
  background: #e9ecef;
}

.assign-chip.active {
  background: #2e7d32;
  color: #fff;
  border-color: #2e7d32;
}

.assign-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 600;
  background: #2e7d32;
  color: #fff;
  border: 1px solid #2e7d32;
  cursor: pointer;
  line-height: 1;
}

.assign-action-chip i {
  font-size: 12px;
}

.assign-action-chip:hover {
  background: #256628;
  border-color: #256628;
}

/* =========================
   8. FILTER ROW
========================= */

.style-title2.st-title2-wth-lable {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.assigned-badge {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 12px;
  display: inline-block;
}

/* =========================
   9. QUEUE BOX (IN ASSIGN MODAL)
========================= */

#queueBox {
  margin-top: 14px;
  margin-bottom: 22px;
}

#queueBox label,
#agentBox label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

#queue_select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#queue_select:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46,125,50,0.18);
}

#queue_select:disabled {
  background: linear-gradient(90deg, #f0f0f0 30%, #e0e0e0 50%, #f0f0f0 70%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

.agent-load {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.agent-load.green { background: #2e7d32; }
.agent-load.orange { background: #f9a825; }
.agent-load.red { background: #d32f2f; }

option[title] {
  cursor: help;
}

/* =========================
   10. QUEUE MANAGEMENT MODAL
========================= */

.queue-modal-xl {
  width: 900px;
  max-width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
  padding: 24px;
}

.queue-modal-md {
  width: 600px;
  max-width: 95%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 24px;
  position: relative;
  z-index: 10001;
}

.modal-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-shrink: 0;
  background: #fff;
  z-index: 11;
  padding-bottom: 8px;
}

.btn-close-custom {
  background: #ef5350;
  color: #fff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-close-custom:hover {
  background: #d32f2f;
  transform: rotate(90deg);
}

/* =========================
   11. QUEUE TABS
========================= */

.queue-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
  flex-shrink: 0;
  background: #fff;
  z-index: 10;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: #f5f5f5;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #666;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: #e8f5e9;
  color: #2e7d32;
}

.tab-btn.active {
  background: #fff;
  color: #2e7d32;
  border-bottom-color: #2e7d32;
}

.tab-btn i {
  margin-right: 6px;
}

.queue-tab-content {
  display: none;
}

.queue-tab-content.active {
  display: block;
}

/* =========================
   12. QUEUE LIST HEADER
========================= */

.queue-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-shrink: 0;
}

.queue-search {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  font-size: 14px;
}

.queue-count-badge {
  background: #e3f2fd;
  color: #1565c0;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
}

/* =========================
   13. QUEUE CARDS GRID
========================= */

.queue-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
  max-height: calc(90vh - 280px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 8px 4px 4px;
}

.queue-cards-grid::-webkit-scrollbar {
  width: 8px;
}

.queue-cards-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.queue-cards-grid::-webkit-scrollbar-thumb {
  background: #2e7d32;
  border-radius: 4px;
}

.queue-cards-grid::-webkit-scrollbar-thumb:hover {
  background: #1b5e20;
}

.queue-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s;
}

.queue-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #2e7d32;
}

.queue-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.queue-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.queue-card-badge {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.queue-card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #666;
}

.queue-card-meta i {
  margin-right: 6px;
  color: #2e7d32;
}

.queue-card-agents {
  margin-bottom: 12px;
}

.queue-card-agents-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
}

.agent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.agent-tag {
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  color: #333;
  border: 1px solid #e0e0e0;
}

.queue-card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

/* =========================
   14. QUEUE SECTIONS
========================= */

.queue-section {
  border: 1px solid #ddd;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: visible !important;
}

.queue-section h4 {
  margin-bottom: 8px;
  font-size: 15px;
}

.queue-section-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: #2e7d32;
}

.queue-modal-md .queue-section {
  max-height: calc(85vh - 100px);
  overflow-y: auto;
  padding-right: 4px;
}

.queue-modal-md .queue-section::-webkit-scrollbar {
  width: 8px;
}

.queue-modal-md .queue-section::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.queue-modal-md .queue-section::-webkit-scrollbar-thumb {
  background: #2e7d32;
  border-radius: 4px;
}

.queue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.queue-input,
.queue-multiselect {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  font-size: 13px;
}

.queue-multiselect {
  height: 140px;
}

.queue-actions {
  margin-top: 12px;
  text-align: right;
}

.queue-actions-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.queue-actions-split > div {
  display: flex;
  gap: 8px;
}

.queue-field {
  margin-bottom: 22px;
  position: relative;
}

.queue-field select,
#queue_department,
#queue_agent_select,
#assign_type,
#assign_queue_select,
#department_queue_select {
  width: 100%;
  padding: 10px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #cfd8dc;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.queue-field select:focus,
#queue_department:focus,
#queue_agent_select:focus {
  border-color: #2e7d32;
  box-shadow: 0 0 0 2px rgba(46,125,50,0.18);
}

.queue-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.queue-row select {
  flex: 1;
}

.queue-row button {
  padding: 9px 14px;
  border-radius: 6px;
}

/* =========================
   15. AGENT TAGS (EDIT MODAL)
========================= */

.agent-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  padding: 10px;
  background: #f9f9f9;
  border: 1px dashed #cfd8dc;
  border-radius: 6px;
}

.agent-tag-removable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e3f2fd;
  color: #1565c0;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
}

.agent-tag-remove {
  background: transparent;
  border: none;
  color: #d32f2f;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  width: 18px;
  height: 18px;
  line-height: 1;
}

.agent-tag-remove:hover {
  color: #b71c1c;
}

/* =========================
   16. EMPTY STATES
========================= */

.queue-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.queue-empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ccc;
}

.queue-empty-state p {
  font-size: 16px;
  margin: 0;
}

#queueAgentList {
  background: #f9fafb;
  border: 1px dashed #cfd8dc;
  padding: 10px;
  border-radius: 6px;
  min-height: 40px;
}

.queue-agent {
  background: #f5f7fa;
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  border: 1px solid #e0e0e0;
  font-size: 13px;
}

.queue-agent.active {
  background: #e3f2fd;
  border-color: #64b5f6;
}

.queue-agent.active .queue-agent-name {
  color: #1565c0;
}

.queue-remove {
  background: transparent;
  border: none;
  color: #d32f2f;
  cursor: pointer;
  font-size: 14px;
}

.queue-remove:hover {
  color: #b71c1c;
}

.queue-empty {
  font-size: 12px;
  color: #9e9e9e;
  font-style: italic;
  text-align: center;
  padding: 12px 0;
}

/* =========================
   17. AGENT MULTI-SELECT DROPDOWN
========================= */

.agent-multi-select {
  position: static !important;
  width: 100% !important;
  z-index: 1;
}

.agent-select-box {
  border: 1px solid #cfd8dc;
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff;
  cursor: pointer;
  width: 100% !important;
  font-size: 14px;
  color: #555;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: block;
}

.agent-select-box:hover {
  border-color: #2e7d32;
  box-shadow: 0 2px 6px rgba(46,125,50,0.15);
}

.agent-select-box.has-selection {
  border-color: #2e7d32;
  background: #f1f8f4;
  color: #2e7d32;
  font-weight: 600;
}

/* =========================
   18. AGENT DROPDOWN (FIXED Z-INDEX)
========================= */

.agent-dropdown,
#agentDropdown,
#editAgentDropdown {
  position: fixed !important;
  background: #fff;
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: none;
  z-index: 99999 !important;
  min-width: 600px !important;
  max-height: 500px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

#agentDropdown.show,
#editAgentDropdown.show {
  display: block !important;
}

#agentSearch,
#editAgentSearch {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 2px solid #e0e0e0;
  outline: none;
  font-size: 14px;
  background: #fafafa;
  box-sizing: border-box;
  font-weight: 500;
}

#agentSearch:focus,
#editAgentSearch:focus {
  border-bottom-color: #2e7d32;
  background: #fff;
}

#agentSearch::placeholder,
#editAgentSearch::placeholder {
  color: #999;
}

#agentList,
#editAgentList {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
}

#agentList::-webkit-scrollbar,
#editAgentList::-webkit-scrollbar {
  width: 10px;
}

#agentList::-webkit-scrollbar-track,
#editAgentList::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 5px;
}

#agentList::-webkit-scrollbar-thumb,
#editAgentList::-webkit-scrollbar-thumb {
  background: #2e7d32;
  border-radius: 5px;
}

#agentList::-webkit-scrollbar-thumb:hover,
#editAgentList::-webkit-scrollbar-thumb:hover {
  background: #1b5e20;
}

/* =========================
   19. AGENT ROW IN DROPDOWN
========================= */

.agent-row {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  align-items: flex-start;
  transition: background 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.agent-row:hover {
  background: #f0f7f4;
}

.agent-row:last-child {
  border-bottom: none;
}

.agent-row input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  margin-top: 3px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #2e7d32;
}

.agent-info {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.agent-name {
  font-weight: 700;
  font-size: 16px;
  color: #1a1a1a;
  margin-bottom: 8px;
  line-height: 1.3;
}

.agent-meta {
  font-size: 13px;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agent-workload {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workload-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.workload-dot.low {
  background: #4caf50;
  box-shadow: 0 0 0 3px rgba(76,175,80,0.2);
}

.workload-dot.medium {
  background: #ff9800;
  box-shadow: 0 0 0 3px rgba(255,152,0,0.2);
}

.workload-dot.high {
  background: #f44336;
  box-shadow: 0 0 0 3px rgba(244,67,54,0.2);
}

.workload-text {
  font-size: 13px;
  color: #555;
  font-weight: 600;
}

.agent-queues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.queue-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  line-height: 1.3;
  white-space: nowrap;
}

.queue-tag i {
  font-size: 11px;
}

.queue-tag.queue-mapped {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}

.queue-tag.queue-unmapped {
  background: #fff3e0;
  color: #e65100;
  border-color: #ffe0b2;
}

.queue-tag.no-queue {
  background: #ffebee;
  color: #c62828;
  border-color: #ffcdd2;
}

/* =========================
   20. ANIMATIONS
========================= */

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================
   21. RESPONSIVE
========================= */

@media (max-width: 768px) {
  .queue-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .queue-tabs {
    flex-direction: column;
  }
  
  .queue-modal-xl,
  .queue-modal-md {
    width: 95%;
  }
  
  .agent-dropdown,
  #agentDropdown,
  #editAgentDropdown {
    min-width: 95vw !important;
    left: 2.5vw !important;
  }
}

@media (max-height: 768px) {
  .queue-modal-xl {
    max-height: 95vh;
  }
  
  .queue-modal-md {
    max-height: 90vh;
  }
  
  .queue-cards-grid {
    max-height: calc(95vh - 280px);
  }
}

/* =========================
   22. EDIT QUEUE OVERLAY
========================= */

#edit-queue-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#edit-queue-overlay .queue-modal-md {
  position: relative;
  z-index: 10001;
  overflow: visible !important;
}

#edit-queue-overlay .agent-multi-select {
  position: relative;
  z-index: 1;
}

#edit-queue-overlay .queue-section {
  overflow: visible !important;
}

/* Force dropdown to be above overlays and clickable */
#agentDropdown, #editAgentDropdown{
  position: fixed !important;
  z-index: 99999 !important;
  display: none;
  pointer-events: auto;
}
#agentDropdown.show, #editAgentDropdown.show{
  display: block !important;
}

#remark-modal{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  z-index:99999;
}
