@import "https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css";

/* Custom styles for DogWalk Pro */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: #e5e7eb;
}

.calendar-day {
  background-color: white;
  min-height: 140px;
  padding: 12px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.calendar-day:hover {
  background-color: #f8fafc;
}

.calendar-day.other-month {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: default;
}

.calendar-day.other-month:hover {
  background-color: #f9fafb;
}

.calendar-day.today {
  background-color: #dbeafe;
  border: 2px solid #3b82f6;
}

.service-item {
  font-size: 0.75rem;
  padding: 4px 6px;
  margin: 2px 0;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-item:hover {
  opacity: 0.8;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-item.scheduled {
  background-color: #6b7280;
}

.service-item.assigned {
  background-color: #3b82f6;
}

.service-item.completed {
  background-color: #10b981;
}

.service-item.cancelled {
  background-color: #ef4444;
}

.service-item.in_progress {
  background-color: #f59e0b;
}

/* Role-based styling */
.admin-header {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

.walker-header {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

/* Custom animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Recurrence preview styles */
.recurrence-preview {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #3b82f6;
}

/* Modal enhancements */
.modal-overlay {
  backdrop-filter: blur(4px);
}

/* Calendar navigation */
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calendar-nav button,
.calendar-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: all 0.2s;
}

.calendar-nav button:hover,
.calendar-nav a:hover {
  background-color: #f3f4f6;
  transform: translateY(-1px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .calendar-day {
    min-height: 100px;
    padding: 8px;
  }

  .service-item {
    font-size: 0.625rem;
    padding: 2px 4px;
    margin: 1px 0;
  }

  .calendar-day .service-item br {
    display: none;
  }

  .calendar-day .service-item small {
    display: none;
  }
}

@media (max-width: 640px) {
  .calendar-day {
    min-height: 80px;
    padding: 4px;
  }

  .service-item {
    font-size: 0.5rem;
    padding: 1px 2px;
  }
}

/* Print styles */
@media print {
  .calendar-day {
    min-height: 120px;
    break-inside: avoid;
  }

  .service-item {
    background-color: #e5e7eb !important;
    color: #374151 !important;
    border: 1px solid #9ca3af;
  }

  .no-print {
    display: none !important;
  }
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Enhanced form styles */
.form-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.form-section h3 {
  color: #374151;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-scheduled {
  background-color: #f3f4f6;
  color: #374151;
}

.status-assigned {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-completed {
  background-color: #d1fae5;
  color: #065f46;
}

.status-cancelled {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-in_progress {
  background-color: #fef3c7;
  color: #92400e;
}
