/*
	Custom CSS for Pilates Studio
	Modern, elegant design with calming colors
	and smooth interactions
*/

/* Event Titles - Clean and elegant */
#events h3 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e3f;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

/* Duration Display - Subtle and informative */
#events p.duration,
#events div.duration {
  font-size: 0.875rem;
  color: #6b7c7d;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  background: #f5f7f7;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Description Text - Readable and calm */
#events p.description,
#events div.description {
  font-size: 0.9375rem;
  color: #4a5c5d;
  line-height: 1.6;
  margin-top: 0.5rem;
  font-weight: 400;
}

/* Selected Event - Highlighted with studio colors */
#events .selectedEvent {
  background: linear-gradient(135deg, #e8f3f1 0%, #f0f5f4 100%);
  border: 2px solid #7ba89a;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(123, 168, 154, 0.15);
  transition: all 0.3s ease;
}

#events .selectedEvent:hover {
  box-shadow: 0 6px 16px rgba(123, 168, 154, 0.2);
  transform: translateY(-2px);
}

/* Reserve Time Button - Primary action */
#events input.reserve_time_btn {
  background: linear-gradient(135deg, #7ba89a 0%, #6a9688 100%);
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(123, 168, 154, 0.25);
  letter-spacing: 0.02em;
}

#events input.reserve_time_btn:hover {
  background: linear-gradient(135deg, #6a9688 0%, #5a8678 100%);
  box-shadow: 0 4px 12px rgba(123, 168, 154, 0.35);
  transform: translateY(-1px);
}

#events input.reserve_time_btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(123, 168, 154, 0.3);
}

/* Select Another Button - Secondary action */
#events input.select_another_btn {
  background: white;
  color: #7ba89a;
  border: 2px solid #7ba89a;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

#events input.select_another_btn:hover {
  background: #f5f7f7;
  border-color: #6a9688;
  color: #6a9688;
  transform: translateY(-1px);
}

/* Form Section Headers */
#eventForm #start_date-block-container h3,
#eventForm #timeline-container h3 {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #2c3e3f;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e8f3f1;
  letter-spacing: -0.01em;
}

/* Save Button - Prominent call to action */
#eventForm #save_button {
  background: linear-gradient(135deg, #7ba89a 0%, #6a9688 100%);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(123, 168, 154, 0.3);
  letter-spacing: 0.02em;
  margin-top: 1.5rem;
}

#eventForm #save_button:hover {
  background: linear-gradient(135deg, #6a9688 0%, #5a8678 100%);
  box-shadow: 0 5px 15px rgba(123, 168, 154, 0.4);
  transform: translateY(-2px);
}

/* UI Widget Content - Clean container */
div.ui-widget-content {
  background: white;
  border: 1px solid #e0e8e7;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* UI Widget Header - Elegant header style */
div.ui-widget-header {
  background: linear-gradient(135deg, #f5f7f7 0%, #e8f3f1 100%);
  border: none;
  border-radius: 10px 10px 0 0;
  padding: 1rem 1.5rem;
  color: #2c3e3f;
  font-weight: 600;
  font-size: 1.0625rem;
}

/* Timeline Table - Clean grid layout */
#timeline-container table.timeline {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Not Worked Time - Subtle disabled state */
.timeline td.not_worked_time {
  background: #f9fafa;
  color: #b0bebe;
  cursor: not-allowed;
  border: 1px solid #e8eded;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
}

/* Free Time - Available slots */
.timeline td.free_time {
  background: white;
  color: #4a5c5d;
  cursor: pointer;
  border: 1px solid #e0e8e7;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.timeline td.free_time:hover {
  background: #e8f3f1;
  border-color: #7ba89a;
  color: #2c3e3f;
  transform: scale(1.02);
}

/* Selected Time - Active selection */
.timeline td.selected_time {
  background: linear-gradient(135deg, #7ba89a 0%, #6a9688 100%);
  color: white;
  border: 2px solid #5a8678;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(123, 168, 154, 0.3);
  cursor: pointer;
}

/* Reserved Time - Already booked */
.timeline td.reserved_time {
  background: #f5e6e8;
  color: #8b6b70;
  border: 1px solid #e8d5d8;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  cursor: not-allowed;
  position: relative;
}

.timeline td.reserved_time::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  opacity: 0.3;
}

/* Loading Indicator - Smooth loading state */
div#loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 2rem 3rem;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  text-align: center;
  backdrop-filter: blur(8px);
}

div#loading::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border: 4px solid #e8f3f1;
  border-top-color: #7ba89a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Form Labels - Clear and accessible */
#start_date-block-container .zend_form dt,
#start_date-block-container .zend_form dt b,
#start_date-block-container .zend_form dd label {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c3e3f;
  margin-bottom: 0.5rem;
  display: block;
  letter-spacing: 0.01em;
}

/* Additional modern touches */
* {
  box-sizing: border-box;
}

#events input[type="button"],
#events input[type="submit"],
#eventForm input[type="button"],
#eventForm input[type="submit"] {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
}

/* Smooth transitions for all interactive elements */
#events *,
#eventForm *,
.timeline * {
  transition: all 0.2s ease;
}
