/* ══════════════════════════════════════════════
   EQLAB LIMS — Global Stylesheet
   ══════════════════════════════════════════════ */

/* ── Base ── */
body {
  font-family: 'Space Grotesk', sans-serif;
  height: 100%;
  margin: 0;
}

html {
  height: 100%;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Sidebar Resizer - kéo giãn thanh bên trái */
@media (min-width: 768px) {
    #customerSidebar {
        width: var(--sidebar-width, 320px);
        min-width: 250px;
        max-width: 60vw;
    }
}

#sidebarResizer {
    width: 6px;
    margin-left: -3px;
    margin-right: -3px;
    cursor: col-resize;
    background-color: transparent;
    transition: background-color 0.2s;
    flex-shrink: 0;
    z-index: 20;
    position: relative;
}

#sidebarResizer:hover,
#sidebarResizer.dragging {
    background-color: rgba(59, 130, 246, 0.5);
}

/* Tuỳ chỉnh Style Select2 Tailwind - Dùng cho trang edit standard */
.select2-container--default .select2-selection--multiple {
    border-color: #cbd5e1;
    border-radius: 0.5rem;
    min-height: 42px;
}

.dark .select2-container--default .select2-selection--multiple {
    background-color: #334155;
    border-color: #475569;
}

.dark .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #1e293b;
    border-color: #475569;
    color: white;
}

.dark .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #94a3b8;
}

.dark .select2-dropdown {
    background-color: #334155;
    border-color: #475569;
}

.dark .select2-search__field {
    color: white;
}

.dark .select2-results__option {
    color: white;
}

.dark .select2-results__option[aria-selected="true"] {
    background-color: #475569;
}

.dark .select2-results__option--highlighted[aria-selected] {
    background-color: #2563eb;
}



/* Custom Select2 Tailwind Styling - Dùng cho trang edit parameter */
.select2-container .select2-selection--single {
    height: 38px;
    border-color: #4ade80;
    /* green-400 */
    border-width: 2px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
}

.dark .select2-container .select2-selection--single {
    background-color: #101922;
    border-color: #16a34a;
    /* green-600 */
    color: white;
}

.dark .select2-container .select2-selection__rendered {
    color: white !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.dark .select2-dropdown {
    background-color: #374151;
    border-color: #4b5563;
}

.dark .select2-search__field {
    background-color: #1f2937;
    color: white;
    border-color: #4b5563;
}

.dark .select2-results__option {
    color: white;
}

.dark .select2-results__option[aria-selected="true"] {
    background-color: #4b5563;
}

.dark .select2-results__option--highlighted[aria-selected] {
    background-color: #22c55e;
}

.select2-selection__rendered {
    font-size: 0.875rem;
    /* text-sm */
    padding-left: 0.5rem;
}
/* Global Toast Notification System */
#global-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.global-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 12px;
  min-width: 300px;
  max-width: 400px;
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #6b7280;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.dark .global-toast {
  background: #1e293b;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.global-toast.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.global-toast.toast-hide {
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
  pointer-events: none;
}

.global-toast-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.global-toast-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.global-toast-title {
  font-weight: 700;
  font-size: 14px;
  color: #111418;
}
.dark .global-toast-title { color: #f8fafc; }

.global-toast-message {
  font-size: 13px;
  color: #64748b;
  line-height: 1.4;
}
.dark .global-toast-message { color: #94a3b8; }

/* Toast Variants */
.toast-success { border-left-color: #10b981; }
.toast-success .global-toast-icon { color: #10b981; }

.toast-error { border-left-color: #ef4444; }
.toast-error .global-toast-icon { color: #ef4444; }

.toast-warning { border-left-color: #f59e0b; }
.toast-warning .global-toast-icon { color: #f59e0b; }

.toast-info { border-left-color: #3b82f6; }
.toast-info .global-toast-icon { color: #3b82f6; }

/* Global Confirm Modal */
.lims-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lims-confirm-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.lims-confirm-modal {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.dark .lims-confirm-modal {
  background: #1e293b;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lims-confirm-overlay.show .lims-confirm-modal {
  transform: translateY(0) scale(1);
}

.lims-confirm-body {
  padding: 24px;
}

.lims-confirm-title {
  font-size: 18px;
  font-weight: 700;
  color: #111418;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dark .lims-confirm-title {
  color: #f8fafc;
}

.lims-confirm-title .material-symbols-outlined {
  color: #f59e0b; /* Warning color by default */
  font-size: 24px;
}

.lims-confirm-message {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  white-space: pre-line;
}

.dark .lims-confirm-message {
  color: #94a3b8;
}

.lims-confirm-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.dark .lims-confirm-footer {
  background: #0f172a;
  border-top-color: #334155;
}

.lims-confirm-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 80px;
  text-align: center;
}

.lims-confirm-btn-cancel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.lims-confirm-btn-cancel:hover {
  background: #f1f5f9;
  color: #111418;
}

.dark .lims-confirm-btn-cancel {
  background: transparent;
  border-color: #475569;
  color: #cbd5e1;
}

.dark .lims-confirm-btn-cancel:hover {
  background: #1e293b;
  color: #f8fafc;
}

.lims-confirm-btn-confirm {
  background: #ef4444; /* Default delete style */
  border: 1px solid transparent;
  color: #ffffff;
}

.lims-confirm-btn-confirm:hover {
  background: #dc2626;
}
