/**
 * Booking Calendar Styles - PREMIUM GLASSMORPHISM
 * Luxury design for guest-facing availability calendar
 */

.booking-calendar {
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.booking-calendar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6B9F5C, #D4AF37, #6B9F5C);
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.booking-calendar:hover {
  box-shadow: 
    0 12px 48px rgba(107, 159, 92, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

/* Calendar Header */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calendar-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: #2c4a3f;
  margin: 0;
}

.btn-nav {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(107, 159, 92, 0.2);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  color: #6B9F5C;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

.btn-nav:hover {
  background: rgba(107, 159, 92, 0.1);
  backdrop-filter: blur(16px);
  border-color: #6B9F5C;
  color: #5a8a4c;
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(107, 159, 92, 0.2);
}

.btn-nav:active {
  transform: scale(1.05);
}

/* Selected Dates Display */
.selected-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.date-input {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
}

.date-input label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  font-weight: 500;
}

.date-input label i {
  margin-right: 4px;
}

.date-value {
  font-size: 14px;
  color: #1f2937;
  font-weight: 500;
}

/* Calendar Grid */
.calendar-grid {
  margin-bottom: 20px;
}

.weekday-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  padding: 8px 0;
}

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.day.empty {
  background: transparent;
}

/* Available dates - clickable with glassmorphism */
.day:not(.empty):not(.past):not(.blocked) {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  color: #2C2C2C;
  cursor: pointer;
  border: 2px solid rgba(107, 159, 92, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.day:not(.empty):not(.past):not(.blocked):hover {
  background: rgba(107, 159, 92, 0.15);
  backdrop-filter: blur(12px);
  border-color: #6B9F5C;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(107, 159, 92, 0.2);
  z-index: 10;
}

/* Today */
.day.today:not(.blocked) {
  border-color: #8B7355;
  font-weight: 700;
}

/* Past dates */
.day.past {
  background: #fafafa;
  color: #d1d5db;
  cursor: not-allowed;
}

/* Blocked dates */
.day.blocked {
  background: #fee2e2;
  color: #991b1b;
  cursor: not-allowed;
  position: relative;
}

.day.blocked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 1px;
  background: #991b1b;
  transform: rotate(-45deg);
}

/* Selected range - Premium glassmorphism */
.day.selected {
  background: linear-gradient(135deg, rgba(107, 159, 92, 0.15), rgba(107, 159, 92, 0.25)) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: #2C2C2C;
  border-color: rgba(107, 159, 92, 0.4);
  box-shadow: 0 2px 8px rgba(107, 159, 92, 0.15);
}

/* Check-in date - Premium green with gold accent */
.day.check-in {
  background: linear-gradient(135deg, #6B9F5C 0%, #5a8a4c 100%) !important;
  color: white !important;
  border-color: #5a8a4c !important;
  font-weight: 700;
  box-shadow: 
    0 4px 16px rgba(107, 159, 92, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.day.check-in::before {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
}

/* Check-out date - Premium gold/bronze gradient */
.day.check-out {
  background: linear-gradient(135deg, #D4AF37 0%, #C9A532 100%) !important;
  color: white !important;
  border-color: #d97706 !important;
  font-weight: 700;
}

/* Legend */
.calendar-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 20px;
}

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

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.legend-color.available {
  background: #f9fafb;
}

.legend-color.blocked {
  background: #fee2e2;
}

.legend-color.selected {
  background: #10b981;
}

/* Booking Summary */
.booking-summary {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.booking-summary.error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
  text-align: center;
}

.booking-summary.error i {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
}

.booking-summary h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: #2c4a3f;
  margin: 0 0 16px 0;
}

.booking-summary h4 i {
  margin-right: 8px;
  color: #8B7355;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #4b5563;
}

.summary-row.subtotal {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-weight: 600;
}

.summary-row.total {
  padding: 12px 0;
  margin-top: 8px;
  border-top: 2px solid #2c4a3f;
  font-size: 18px;
  font-weight: 700;
  color: #2c4a3f;
}

/* Buttons */
.btn-book {
  width: 100%;
  background: #2c4a3f;
  color: white;
  border: none;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: all 0.2s;
}

.btn-book:hover {
  background: #1f3329;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 74, 63, 0.3);
}

.btn-book i {
  margin-right: 8px;
}

.btn-clear {
  width: 100%;
  background: white;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s;
}

.btn-clear:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-clear i {
  margin-right: 6px;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .booking-calendar {
    padding: 16px;
  }
  
  .calendar-title {
    font-size: 20px;
  }
  
  .selected-dates {
    grid-template-columns: 1fr;
  }
  
  .day {
    font-size: 12px;
  }
  
  .calendar-legend {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
}

/* Alert styles */
.alert {
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.alert i {
  font-size: 20px;
}

/* Toast Notification */
.calendar-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: white;
  border: 2px solid #fca5a5;
  border-radius: 12px;
  padding: 20px 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 320px;
  max-width: 500px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.calendar-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.calendar-toast.warning {
  border-color: #fbbf24;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.calendar-toast.error {
  border-color: #f87171;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.calendar-toast .toast-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.calendar-toast.warning .toast-icon {
  color: #f59e0b;
}

.calendar-toast.error .toast-icon {
  color: #ef4444;
}

.calendar-toast .toast-content {
  flex: 1;
}

.calendar-toast .toast-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px 0;
  color: #1f2937;
}

.calendar-toast .toast-message {
  font-size: 14px;
  margin: 0;
  color: #4b5563;
  line-height: 1.4;
}

.calendar-toast .toast-close {
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  padding: 4px;
  flex-shrink: 0;
}

.calendar-toast .toast-close:hover {
  color: #1f2937;
  transform: scale(1.1);
}

@media (max-width: 640px) {
  .calendar-toast {
    min-width: 280px;
    max-width: calc(100vw - 40px);
    padding: 16px 20px;
  }

  .calendar-toast .toast-icon {
    font-size: 24px;
  }

  .calendar-toast .toast-title {
    font-size: 14px;
  }

  .calendar-toast .toast-message {
    font-size: 13px;
  }
}

/* Guest Selector */
.guest-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(249, 250, 251, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.guest-selector label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.guest-selector label i {
  margin-right: 0.5rem;
  color: #6B9F5C;
}

.guest-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.guest-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #ddd;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #666;
  transition: all 0.2s ease;
}

.guest-btn:hover:not(:disabled) {
  border-color: #6B9F5C;
  color: #6B9F5C;
  background: #f0f7ed;
}

.guest-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.guest-count {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  min-width: 2rem;
  text-align: center;
}

/* Price Preview */
.price-preview {
  background: linear-gradient(135deg, #f8fdf6 0%, #f0f7ed 100%);
  border: 1px solid #d4e5cf;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.price-preview-empty {
  background: rgba(249, 250, 251, 0.6);
  border: 1px dashed #ddd;
}

.price-preview .price-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #888;
  font-size: 0.9rem;
}

.price-preview .price-hint i {
  color: #6B9F5C;
}

.price-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.price-row .price-label {
  color: #555;
}

.price-row .price-value {
  color: #333;
  font-weight: 500;
}

.price-row.price-total {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid #6B9F5C;
}

.price-row.price-total .price-label {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.price-row.price-total .price-value {
  font-weight: 700;
  color: #6B9F5C;
  font-size: 1.25rem;
}
