/* Custom Component Styles for Medivant Health Warehouse AI */

/* Medivant Health Glassmorphism & Blurred Background Theme */
body {
  background-image: url('assets/pharma_bg.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-attachment: fixed !important;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
}

/* Side Drawer Navigation Styling */
.nav-item.active {
  background-color: #003366 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.nav-item.active svg {
  color: #38bdf8 !important;
}

/* Metric Cards & Glass Panels */
.metric-card {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 1rem;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
}

.view-header-card {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
}

/* Data Tables */
.data-table-container {
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.75rem;
}

.data-table th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 600;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

.badge-success {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-danger {
  background-color: #ffe4e6;
  color: #9f1239;
}

.badge-warning {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-info {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* Chat Bubbles */
.chat-bubble-user {
  background-color: #4f46e5;
  color: #ffffff;
  border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
  padding: 0.75rem 1rem;
  max-width: 85%;
  margin-left: auto;
  font-size: 0.8125rem;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.15);
}

.chat-bubble-ai {
  background-color: #ffffff;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
  padding: 0.75rem 1rem;
  max-width: 90%;
  margin-right: auto;
  font-size: 0.8125rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* Garment Cards */
.garment-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* Desktop Viewing Comfort & Custom Slim Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.5);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Dual Responsive Mode: Desktop Full Widescreen vs Mobile Phone UI */
@media (min-width: 768px) {
  body {
    display: block !important;
    padding: 0 !important;
    background-image: url('assets/pharma_bg.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
  }

  .app-desktop-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    min-height: 100vh;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-left: 1px solid rgba(226, 232, 240, 0.8);
    border-right: 1px solid rgba(226, 232, 240, 0.8);
  }

  #mainContent {
    padding: 1.5rem 2rem 6rem 2rem !important;
    max-width: 100% !important;
  }

  /* Desktop Data Table Padding & Legibility */
  .data-table {
    font-size: 0.8125rem !important;
  }
  .data-table th {
    font-size: 0.725rem !important;
    padding: 0.875rem 1rem !important;
  }
  .data-table td {
    padding: 0.875rem 1rem !important;
  }
}
