/* Rich Delivery Dashboard Styles */

.podsfw-dashboard-wrap {
  margin: 20px 0;
}

/* Complete button styles */
.complete-order {
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 10 !important;
}

.complete-order:hover {
  background-color: #0073aa !important;
  border-color: #0073aa !important;
}

.complete-order:disabled {
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

/* Completed status text */
.order-status-completed {
  display: inline-block;
  padding: 4px 8px;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 5px;
}

/* Navigation Styles */
.podsfw-dashboard-nav {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 20px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.podsfw-nav-tabs {
  display: flex;
  gap: 5px;
}

.podsfw-nav-tab {
  padding: 8px 16px;
  text-decoration: none;
  color: #666;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  transition: all 0.2s ease;
}

.podsfw-nav-tab:hover {
  background: #f0f0f0;
  color: #333;
}

.podsfw-nav-tab.active {
  background: #0073aa;
  color: white;
  border-color: #0073aa;
}

.podsfw-date-filters select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
}

/* List View Styles */
.podsfw-list-view {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.podsfw-deliveries-table {
  border: none;
}

.podsfw-deliveries-table th {
  background: #f9f9f9;
  font-weight: 600;
  padding: 12px 8px;
}

.podsfw-deliveries-table td {
  padding: 12px 8px;
  vertical-align: middle;
}

.podsfw-deliveries-table tr:hover {
  background: #f9f9f9;
}

.order-status {
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
}

.status-processing {
  background: #fff3cd;
  color: #856404;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-on-hold {
  background: #f8d7da;
  color: #721c24;
}

.no-deliveries {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 40px;
}

/* Today's View Styles */
.podsfw-today-view {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
}

.podsfw-today-summary {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.podsfw-summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-box {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.stat-number {
  display: block;
  font-size: 2em;
  font-weight: bold;
  color: #0073aa;
  margin-bottom: 5px;
}

.stat-label {
  color: #666;
  font-size: 14px;
}

.podsfw-time-slots {
  display: grid;
  gap: 20px;
}

.podsfw-slot-group {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.podsfw-slot-group h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 18px;
}

.podsfw-slot-orders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
}

.podsfw-order-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  transition: all 0.2s ease;
}

.podsfw-order-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.podsfw-order-card.status-completed {
  border-left: 4px solid #28a745;
}

.podsfw-order-card.status-processing {
  border-left: 4px solid #ffc107;
}

.podsfw-order-card.status-on-hold {
  border-left: 4px solid #dc3545;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.order-number {
  font-weight: bold;
  color: #0073aa;
}

.order-status {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
}

.order-customer {
  font-weight: 500;
  margin-bottom: 5px;
}

.order-total {
  color: #28a745;
  font-weight: bold;
  margin-bottom: 10px;
}

.order-actions {
  display: flex;
  gap: 5px;
}

/* Calendar View Styles */
.podsfw-calendar-view {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.podsfw-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.podsfw-calendar-header h2 {
  margin: 0;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.podsfw-calendar-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.podsfw-calendar-nav button {
  background: #0073aa;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.podsfw-calendar-nav button:hover {
  background: #005a87;
  transform: translateY(-1px);
}

.podsfw-calendar-nav button:active {
  transform: translateY(0);
}

.podsfw-calendar {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.podsfw-calendar table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.podsfw-calendar th {
  background: #f8f9fa;
  padding: 15px 10px;
  text-align: center;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #e9ecef;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.podsfw-calendar td {
  padding: 0;
  border: 1px solid #f0f0f0;
  position: relative;
  min-height: 80px;
  vertical-align: top;
}

.podsfw-calendar td:hover {
  background: #f8f9fa;
}

.calendar-date {
  display: block;
  padding: 8px 6px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  border-radius: 4px;
  margin: 4px;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

.calendar-date:hover {
  background: #0073aa;
  color: white;
}

.calendar-date.today {
  background: #0073aa;
  color: white;
  font-weight: bold;
}

.calendar-date.past {
  color: #999;
  background: #f8f9fa;
}

.calendar-date.future {
  color: #333;
}

.delivery-indicator {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  z-index: 3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.delivery-indicator.high {
  background: #dc3545;
}

.delivery-indicator.medium {
  background: #ffc107;
  color: #333;
}

.delivery-indicator.low {
  background: #28a745;
}

.calendar-date-info {
  position: absolute;
  bottom: 2px;
  left: 2px;
  right: 2px;
  font-size: 10px;
  color: #666;
  text-align: center;
  padding: 2px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  z-index: 1;
}

.calendar-legend {
  margin-top: 20px;
  margin-bottom: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.calendar-legend h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.legend-items {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #666;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #ddd;
}

.legend-color.today {
  background: #0073aa;
}

.legend-color.delivery-low {
  background: #28a745;
}

.legend-color.delivery-medium {
  background: #ffc107;
}

.legend-color.delivery-high {
  background: #dc3545;
}

.calendar-empty {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}

.calendar-loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.calendar-loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Modal Styles */
.podsfw-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.podsfw-modal {
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.podsfw-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.podsfw-modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.podsfw-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.podsfw-modal-close:hover {
  background: #e0e0e0;
  color: #333;
}

.podsfw-modal-body {
  padding: 25px;
  max-height: 60vh;
  overflow-y: auto;
}

.podsfw-modal-body table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.podsfw-modal-body th {
  background: #f8f9fa;
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: #495057;
  border-bottom: 1px solid #e9ecef;
  border-top: none;
  border-left: none;
  border-right: none;
}

.podsfw-modal-body td {
  padding: 12px 8px;
  border-bottom: 1px solid #f0f0f0;
  border-top: none;
  border-left: none;
  border-right: none;
  vertical-align: middle;
}

.podsfw-modal-body tr:hover {
  background: #f8f9fa;
}

/* Tooltip styles removed - no longer needed */

/* Enhanced Navigation Styles */
.podsfw-dashboard-nav {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  margin-bottom: 25px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.podsfw-nav-tabs {
  display: flex;
  gap: 8px;
}

.podsfw-nav-tab {
  padding: 10px 18px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.podsfw-nav-tab:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateY(-1px);
}

.podsfw-nav-tab.active {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.podsfw-date-filters select {
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

/* Enhanced Card Styles */
.podsfw-order-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 18px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.podsfw-order-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.podsfw-order-card.status-completed {
  border-left: 4px solid #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%);
}

.podsfw-order-card.status-processing {
  border-left: 4px solid #ffc107;
  background: linear-gradient(135deg, #fffbf0 0%, #ffffff 100%);
}

.podsfw-order-card.status-on-hold {
  border-left: 4px solid #dc3545;
  background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

/* Enhanced Button Styles */
.button {
  background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.button:hover {
  background: linear-gradient(135deg, #005a87 0%, #004466 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.button-primary {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.button-primary:hover {
  background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.button-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

.button-secondary:hover {
  background: linear-gradient(135deg, #545b62 0%, #3d4449 100%);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Analytics View Styles */
.podsfw-analytics-view {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
}

.podsfw-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.analytics-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.analytics-card h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 16px;
}

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

.stat {
  text-align: center;
}

.stat .number {
  display: block;
  font-size: 1.5em;
  font-weight: bold;
  color: #0073aa;
}

.stat .label {
  color: #666;
  font-size: 12px;
}

.slot-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slot-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slot-name {
  min-width: 100px;
  font-size: 14px;
}

.bar-container {
  flex: 1;
  height: 20px;
  background: #e9ecef;
  border-radius: 10px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: linear-gradient(90deg, #0073aa, #005a87);
  transition: width 0.3s ease;
}

.slot-count {
  min-width: 80px;
  text-align: right;
  font-size: 12px;
  color: #666;
}

.status-chart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.status-name {
  font-size: 14px;
}

.status-count {
  font-size: 12px;
  color: #666;
}

/* Slot Management View Styles */
.podsfw-slots-view {
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
}

.podsfw-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.podsfw-slot-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s ease;
}

.podsfw-slot-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.podsfw-slot-card.inactive {
  opacity: 0.6;
  background: #f1f3f4;
}

.slot-header {
  margin-bottom: 15px;
}

.slot-header h3 {
  margin: 0 0 5px 0;
  color: #333;
  font-size: 16px;
}

.slot-time {
  color: #666;
  font-size: 14px;
}

.slot-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.slot-stats .stat {
  text-align: center;
}

.slot-stats .label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 2px;
}

.slot-stats .value {
  font-weight: bold;
  color: #0073aa;
}

.slot-status {
  text-align: center;
}

.status-indicator {
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 500;
}

.status-indicator.active {
  background: #d4edda;
  color: #155724;
}

.status-indicator.inactive {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
  .podsfw-dashboard-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .podsfw-nav-tabs {
    justify-content: center;
    flex-wrap: wrap;
  }

  .podsfw-summary-stats {
    grid-template-columns: 1fr;
  }

  .podsfw-slot-orders {
    grid-template-columns: 1fr;
  }

  .podsfw-analytics-grid {
    grid-template-columns: 1fr;
  }

  .podsfw-slots-grid {
    grid-template-columns: 1fr;
  }

  .analytics-stats {
    grid-template-columns: 1fr;
  }

  .slot-stats {
    grid-template-columns: 1fr;
  }
}
