/* Basic styling for the Wishlist Tracker app */
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* Layout for the various headers */
/* Layout for the various headers */
.sales-header, .leader-header, .admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Luxurious dark blue background and light text */
  background-color: #003366;
  color: #ffffff;
  padding: 15px;
  border-radius: 8px 8px 0 0;
  /* Extend header horizontally beyond card padding */
  margin: -20px -20px 20px -20px;
}
.header-left h1 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

/* Welcome area next to the main title */
/* Styling for the welcome message next to the main title */
.welcome-area {
  font-size: 18px;
  color: #ffffff;
  margin-top: 4px;
}

/* Dashboard panels for salesperson and leader */
/* Dashboard panels for salesperson and leader */
.sales-dashboard, .leader-dashboard {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
/* Metric card styling for a refined look */
.metric-box {
  flex: 1;
  min-width: 150px;
  background-color: #f8f9fa;
  border: none;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.metric-title {
  font-size: 12px;
  color: #555;
  margin-bottom: 4px;
}
.metric-value {
  font-size: 20px;
  font-weight: bold;
  color: #d4af37; /* gold accent for luxury feel */
}

/* Footer tag line */
/* Footer tag line */
.footer {
  text-align: center;
  margin-top: 40px;
  font-size: 12px;
  color: #777;
}

/* Admin page sections */
.admin-section {
  margin-bottom: 20px;
}

/* Containers spacing */
#wishlistContainerOpen, #wishlistContainerSold {
  margin-bottom: 20px;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  margin-top: 0;
}

.page {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.error {
  color: #d9534f;
  margin-top: 10px;
}

.logout {
  float: right;
  padding: 8px 16px;
  margin-top: 0;
  background-color: #d9534f;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.logout:hover {
  background-color: #c9302c;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 16px;
}

button {
  padding: 10px 20px;
  border: none;
  background-color: #007bff;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: #0056b3;
}

.summary {
  margin-bottom: 20px;
  background-color: #e9ecef;
  padding: 10px;
  border-radius: 4px;
}

.wishlist-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #fafafa;
  cursor: pointer;
}

.wishlist-card:hover {
  background-color: #f1f1f1;
}

.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

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

.item-info {
  flex: 1;
}

.sold-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 10px;
  background-color: #28a745;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
}

.mark-sold-btn {
  background-color: #28a745;
  color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

/* Inventory badge styling for salesperson items */
.inventory-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  color: #fff;
}
.inventory-badge.in-stock {
  background-color: #28a745; /* green */
}
.inventory-badge.out-of-stock {
  background-color: #dc3545; /* red */
}

.mark-sold-btn:hover {
  background-color: #218838;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table th, table td {
  border: 1px solid #ddd;
  padding: 8px;
}

table th {
  background-color: #f2f2f2;
}
/* Additional styling for enhanced salesperson view */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}
.controls label {
  display: flex;
  align-items: center;
  font-size: 14px;
}
.controls select {
  margin-left: 5px;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Custom vendor dropdown */
.vendor-dropdown {
  position: relative;
  display: inline-block;
}
.vendor-dropdown button {
  padding: 5px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.vendor-dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  min-width: 180px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.vendor-dropdown-content.show {
  display: block;
}
.vendor-dropdown-content label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.vendor-dropdown-content input[type="checkbox"] {
  margin-right: 6px;
}

/* Hide completed wishlists header when printing */
@media print {
  .sold-header {
    display: none !important;
  }
}

/* Script font for MyWish logo */
h1 {
  font-family: 'Segoe Script', 'Brush Script MT', cursive;
}

/* Multi-select styling */
select[multiple] {
  height: auto;
  min-height: 100px;
}
.controls button {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}
.controls button:hover {
  background-color: #0062cc;
}

/* Quick date buttons have a distinct color from system buttons */
/* Style quick date buttons differently from other system buttons by increasing specificity */
.controls .quick-date-btn {
  /* Distinct styling for quick date buttons: use a purple tone to differentiate from blue system actions */
  background-color: #6f42c1;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  margin-left: 4px;
}
.controls .quick-date-btn:hover {
  background-color: #59309e;
}
.wishlist-card-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}
.header-info div {
  margin-bottom: 3px;
}

/* Link styling in header info (call links) */
.header-info a {
  color: #007bff;
  text-decoration: underline;
  font-size: 14px;
}
.header-info a:hover {
  text-decoration: none;
}
.header-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.header-actions a {
  background-color: #17a2b8;
  color: white;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 4px;
}
.header-actions a:hover {
  background-color: #138496;
}
.header-actions button {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.header-actions button:hover {
  background-color: #5a6268;
}
.progress {
  font-size: 14px;
  margin-top: 5px;
  color: #555;
}
.sold-header {
  margin-top: 20px;
  background-color: #e9ecef;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}
.sold-header h3 {
  margin: 0;
}
.print-target {
  visibility: visible !important;
}
.hide-print {
  display: none !important;
}
@media print {
  body {
    background-color: white;
  }
  .controls, .logout, #adminPage, #loginPage {
    display: none !important;
  }
  .wishlist-card {
    page-break-inside: avoid;
  }
  /* Hide elements not needed in print */
  .header-actions,
  .mark-sold-btn,
  .print-hide,
  .sales-dashboard,
  .leader-dashboard,
  .footer {
    display: none !important;
  }
  .wishlist-details {
    display: block !important;
  }
}
