/* WAVES Booking Calendar Widget Styles */

/* Значения по умолчанию (темная тема) */
:root {
  --waves-bg-main: #050509;
  --waves-bg-card: #111119;
  --waves-accent: #2563eb;
  --waves-accent-soft: rgba(37, 99, 235, 0.15);
  --waves-text-main: #f9fafb;
  --waves-text-muted: #9ca3af;
  --waves-border-color: rgba(31,41,55,0.9);
  --waves-button-bg: rgba(15,23,42,0.7);
  --waves-button-hover-bg: rgba(31,41,55,0.9);
  --waves-button-border: rgba(148,163,184,0.4);
  --waves-button-hover-border: rgba(148,163,184,0.7);
  --waves-day-available-bg: rgba(15,23,42,0.7);
  --waves-day-available-hover-bg: rgba(31,41,55,0.9);
  --waves-day-unavailable-bg: rgba(15,23,42,0.3);
  --waves-day-hover-border: rgba(96,165,250,0.5);
  --waves-slot-bg: rgba(15,23,42,0.7);
  --waves-slot-hover-bg: rgba(31,41,55,0.9);
  --waves-slot-unavailable-bg: rgba(15,23,42,0.3);
  --waves-slot-hover-border: rgba(96,165,250,0.5);
  --waves-radius-lg: 16px;
  --waves-transition: 0.15s ease;
}

.waves-booking-widget {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--waves-text-main);
  max-width: 100%;
}

/* Кастомный скроллбар для виджета */
.waves-booking-widget * {
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
}

.waves-booking-widget *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.waves-booking-widget *::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.waves-booking-widget *::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: background 0.2s ease;
}

.waves-booking-widget *::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.6);
  background-clip: padding-box;
}

.waves-booking-widget *::-webkit-scrollbar-thumb:active {
  background: rgba(148, 163, 184, 0.8);
  background-clip: padding-box;
}

/* Calendar */
.waves-calendar {
  border-radius: var(--waves-radius-lg);
  background: var(--waves-bg-card);
  border: 1px solid var(--waves-border-color);
  padding: 16px;
}

.waves-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.waves-calendar-month {
  font-size: 15px;
  font-weight: 600;
}

.waves-calendar-nav {
  display: flex;
  gap: 8px;
}

.waves-calendar-nav button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--waves-button-border);
  background: var(--waves-button-bg);
  color: var(--waves-text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--waves-transition);
}

.waves-calendar-nav button:hover {
  background: var(--waves-button-hover-bg);
  border-color: var(--waves-button-hover-border);
}

.waves-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.waves-calendar-day-label {
  text-align: center;
  font-size: 11px;
  color: var(--waves-text-muted);
  padding: 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.waves-calendar-day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--waves-transition);
  border: 1px solid transparent;
}

.waves-calendar-day.other-month {
  color: var(--waves-text-muted);
  opacity: 0.3;
  cursor: default;
}

.waves-calendar-day.past {
  color: var(--waves-text-muted);
  opacity: 0.4;
  cursor: not-allowed;
}

.waves-calendar-day.available {
  background: var(--waves-day-available-bg);
  color: var(--waves-text-main);
}

.waves-calendar-day.available:hover {
  background: var(--waves-day-available-hover-bg);
  border-color: var(--waves-day-hover-border);
}

.waves-calendar-day.unavailable {
  background: var(--waves-day-unavailable-bg);
  color: var(--waves-text-muted);
  cursor: not-allowed;
}

.waves-calendar-day.selected {
  background: var(--waves-accent);
  color: white;
  font-weight: 600;
}

.waves-calendar-day.recommended {
  background: rgba(34, 197, 94, 0.08);
  border: 2px solid rgba(34, 197, 94, 0.6);
  color: #86efac;
  box-shadow: 
    0 0 8px rgba(34, 197, 94, 0.4),
    0 0 12px rgba(34, 197, 94, 0.2),
    inset 0 0 8px rgba(34, 197, 94, 0.1);
  animation: waves-recommended-glow 2.5s ease-in-out infinite;
  position: relative;
}

.waves-calendar-day.recommended::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(45deg, 
    rgba(34, 197, 94, 0.8), 
    rgba(74, 222, 128, 0.6), 
    rgba(34, 197, 94, 0.8));
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: waves-recommended-border 3s linear infinite;
  opacity: 0.7;
  pointer-events: none;
}

.waves-calendar-day.recommended:hover {
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 
    0 0 12px rgba(34, 197, 94, 0.6),
    0 0 18px rgba(34, 197, 94, 0.3),
    inset 0 0 10px rgba(34, 197, 94, 0.15);
  transform: scale(1.05);
  transition: all 0.2s ease;
}

.waves-calendar-day.recommended.selected {
  background: var(--waves-accent);
  border-color: var(--waves-accent);
  color: white;
  box-shadow: 
    0 0 12px rgba(37, 99, 235, 0.6),
    0 0 20px rgba(37, 99, 235, 0.4);
  animation: none;
}

.waves-calendar-day.recommended.selected::before {
  display: none;
}

@keyframes waves-recommended-glow {
  0%, 100% {
    box-shadow: 
      0 0 8px rgba(34, 197, 94, 0.4),
      0 0 12px rgba(34, 197, 94, 0.2),
      inset 0 0 8px rgba(34, 197, 94, 0.1);
  }
  50% {
    box-shadow: 
      0 0 12px rgba(34, 197, 94, 0.6),
      0 0 18px rgba(34, 197, 94, 0.3),
      inset 0 0 10px rgba(34, 197, 94, 0.15);
  }
}

@keyframes waves-recommended-border {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.waves-calendar-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 12px;
  color: var(--waves-text-muted);
  flex-wrap: wrap;
}

.waves-calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.waves-calendar-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 2px solid rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.08);
  box-shadow: 
    0 0 6px rgba(34, 197, 94, 0.4),
    0 0 10px rgba(34, 197, 94, 0.2);
  animation: waves-recommended-glow 2.5s ease-in-out infinite;
}

/* Step label */
.waves-step-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--waves-text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.waves-step-number {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--waves-accent);
  color: white;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Time slots container */
.waves-time-slots-container {
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--waves-radius-lg);
  background: var(--waves-bg-card);
  border: 1px solid var(--waves-border-color);
}

/* Time slots */
.waves-time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.waves-time-slot {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--waves-button-border);
  background: var(--waves-slot-bg);
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--waves-transition);
  color: var(--waves-text-main);
}

.waves-time-slot:hover {
  background: var(--waves-slot-hover-bg);
  border-color: var(--waves-slot-hover-border);
}

.waves-time-slot.unavailable {
  opacity: 0.3;
  cursor: not-allowed;
  background: var(--waves-slot-unavailable-bg);
}

.waves-time-slot.selected {
  background: var(--waves-accent);
  color: white;
  border-color: transparent;
  font-weight: 600;
}

.waves-loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: var(--waves-text-muted);
}

.waves-loading.active {
  display: block;
}

