/* Sold Item Report Styles - Scoped to avoid conflicts */
.sold-item-report {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sold-item-report .report-header {
  margin-bottom: 30px;
}

.sold-item-report .report-header h2 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: #1a1a1a;
}

.sold-item-report .report-header p {
  margin: 0;
  font-size: 16px;
  color: #666666;
  line-height: 1.5;
}

.sold-item-report .filter-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.sold-item-report .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sold-item-report .filter-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333333;
}

.sold-item-report .filter-group select,
.sold-item-report .filter-group input[type="text"] {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  min-width: 160px;
  background-color: #ffffff;
  transition: border-color 0.2s ease-in-out;
}

.sold-item-report .filter-group select:focus,
.sold-item-report .filter-group input[type="text"]:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sold-item-report .filter-group input[type="text"]::placeholder {
  color: #9ca3af;
}

.sold-item-report .submit-button {
  padding: 10px 20px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
  height: fit-content;
}

.sold-item-report .submit-button:hover {
  background-color: #2563eb;
}

.sold-item-report .submit-button:active {
  background-color: #1d4ed8;
}

.sold-item-report .sold-items-table-wrapper {
  margin-top: 30px;
}

.sold-item-report .sold-items-table-wrapper h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.sold-item-report .table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.sold-item-report .sold-items-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
}

.sold-item-report .sold-items-table thead {
  background-color: #f9fafb;
}

.sold-item-report .sold-items-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
}

.sold-item-report .sold-items-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #1f2937;
  border-bottom: 1px solid #f3f4f6;
}

.sold-item-report .sold-items-table tbody tr:hover {
  background-color: #f9fafb;
}

.sold-item-report .sold-items-table tbody tr:last-child td {
  border-bottom: none;
}

.sold-item-report .action-cell {
  position: relative;
  width: 50px;
}

.sold-item-report .dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.sold-item-report .action-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease-in-out;
}

.sold-item-report .action-toggle:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.sold-item-report .dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  min-width: 120px;
  z-index: 10;
  display: none;
}

.sold-item-report .dropdown-wrapper:hover .dropdown-menu {
  display: block;
}

.sold-item-report .dropdown-menu div {
  padding: 8px 12px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.sold-item-report .dropdown-menu div:hover {
  background-color: #f3f4f6;
}

.sold-item-report .dropdown-menu div:first-child {
  border-radius: 6px 6px 0 0;
}

.sold-item-report .dropdown-menu div:last-child {
  border-radius: 0 0 6px 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sold-item-report {
    padding: 16px;
  }
  
  .sold-item-report .filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .sold-item-report .filter-group select,
  .sold-item-report .filter-group input[type="text"] {
    min-width: 100%;
  }
  
  .sold-item-report .submit-button {
    width: 100%;
  }
  
  .sold-item-report .report-header h2 {
    font-size: 24px;
  }
}
/* Add left margin to DataTables search bar */
.dataTables_filter {
  margin-left: 10px; /* adjust the value as needed */
}
/* Fix DataTables clipping issue */
.dataTables_wrapper,
.dataTables_scroll,
.dataTables_scrollBody {
  overflow: visible !important;   /* allow dropdowns to escape */
  position: relative !important;
  z-index: 1;
}

/* Ensure table container doesn’t cut menus */
.sold-item-report .table-container {
  overflow-x: auto;
  overflow-y: visible !important;
  position: relative;
  z-index: 1;
}

/* Make sure action cell doesn’t clip */
.sold-item-report .action-cell,
.sold-item-report .dropdown-wrapper {
  position: relative;
  overflow: visible;
  z-index: 5;
}

/* Dropdown always floats above */
.sold-item-report .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 140px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: none;
  z-index: 9999; /* highest */
}

/* Show on hover */
.sold-item-report .dropdown-wrapper:hover .dropdown-menu {
  display: block;
}
