@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: 'Crimson Text', serif;
    background-color: white;
    color: #8B4513;
    overflow-x: hidden;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif;
  }
}

/* Animations */
@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

@keyframes border-shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes nav-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes card-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes quote-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes glow-pulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(193, 154, 107, 0.5);
  }
  50% { 
    box-shadow: 0 0 40px rgba(193, 154, 107, 0.8);
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Calendar Styles */
.calendar-container {
  background: linear-gradient(135deg, #f5f5dc 0%, #f4e4bc 100%);
  border: 2px solid #c19a6b;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(193, 154, 107, 0.2);
}

.time-slot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.time-slot::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(193, 154, 107, 0.2), transparent);
  transition: left 0.5s ease;
}

.time-slot:hover::before {
  left: 100%;
}

.time-slot.selected {
  background: linear-gradient(135deg, #c19a6b 0%, #8b4513 100%);
  color: #f5f5dc;
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(193, 154, 107, 0.4);
}

.time-slot:disabled {
  background: #e5e5e5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}

.calendar-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.calendar-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #c19a6b;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.selected-appointment {
  background: linear-gradient(135deg, #f4e4bc 0%, #e6d7c3 100%);
  border: 2px solid #c19a6b;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  box-shadow: 0 4px 16px rgba(193, 154, 107, 0.15);
}

.selected-appointment i {
  color: #c19a6b;
  margin-right: 8px;
}

/* Responsive calendar grid */
@media (max-width: 768px) {
  .time-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 769px) {
  .time-slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Calendar Payment Status Styles */
.calendar-booking-paid {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 1px solid #22c55e;
  color: #166534;
}

.calendar-booking-pending {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #eab308;
  color: #92400e;
}

.calendar-booking-confirmed {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: 1px solid #3b82f6;
  color: #1e40af;
}

.calendar-booking-cancelled {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: 1px solid #ef4444;
  color: #991b1b;
}

.calendar-day-today {
  background: linear-gradient(135deg, rgba(193, 154, 107, 0.2) 0%, rgba(193, 154, 107, 0.1) 100%);
  border: 2px solid #c19a6b;
}

.calendar-day-other-month {
  background: rgba(245, 245, 220, 0.3);
  color: #8b4513;
  opacity: 0.6;
}

.calendar-booking-hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease-in-out;
}

/* Payment Status Badge Animations */
.payment-status-badge {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 5px currentColor;
  }
  50% {
    box-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
  }
}

.payment-status-badge.paid {
  animation: none;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.payment-status-badge.pending {
  animation: pulse-glow 2s infinite;
}

/* Calendar Grid Enhancements */
.calendar-grid-day {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.calendar-grid-day::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(193, 154, 107, 0.1), transparent);
  transition: left 0.5s ease;
}

.calendar-grid-day:hover::before {
  left: 100%;
}

.calendar-booking-item {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.calendar-booking-item::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 12px 12px 0;
  border-color: transparent currentColor transparent transparent;
  opacity: 0.3;
}