/* --------------------------------------------------
   Yo Booking – Core Styles
-------------------------------------------------- */

/* Theme variables—you can override these in a parent stylesheet */
:root {
  --booking-base-color: #8248f6;
  --booking-highlight-color: #5e17eb;        /* NEW: secondary hover color */
  --booking-base-color-light: rgba(130, 72, 246, 0.3);
  --booking-text-color: #333;
  --booking-bg-color: #fff;
  --booking-border-color: #ddd;
  --booking-border-radius: 4px;
  --booking-box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Global reset inside booking container */
.yo-booking-container *,
.yo-booking-container *::before,
.yo-booking-container *::after {
  box-sizing: border-box;
}

.iti {display: block;}

/* --------------------------------------------------
   Navigation Buttons
-------------------------------------------------- */
#navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
#navigation button {
  background: var(--booking-bg-color);
  border: 1px solid var(--booking-border-color);
  color: var(--booking-text-color);
  padding: 8px 16px;
  border-radius: var(--booking-border-radius);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
#navigation button:hover:not(:disabled) {
  background: var(--booking-highlight-color);
  color: #fff;
}
#navigation button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------
   Customer Details Form
-------------------------------------------------- */
.new-customer {
  background: var(--booking-bg-color);
  padding: 20px;
  border: 1px solid var(--booking-border-color);
  border-radius: var(--booking-border-radius);
  box-shadow: var(--booking-box-shadow);
  max-width: 400px;
  margin-bottom: 30px;
}
.new-customer h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--booking-base-color);
}
.new-customer p {
  margin-bottom: 16px;
}
.new-customer label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}
.new-customer input,
.new-customer select,
.new-customer textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--booking-border-color);
  border-radius: var(--booking-border-radius);
  color: var(--booking-text-color);
  font-size: 14px;
}
.new-customer input:focus,
.new-customer select:focus,
.new-customer textarea:focus {
  outline: none;
  border-color: var(--booking-base-color);
  box-shadow: 0 0 5px var(--booking-base-color-light);
}
.booking-notice {
  display: block;
  color: #d63638;
  font-size: 12px;
  margin-top: 4px;
}
.required {
  color: #d63638;
  margin-left: 4px;
}

/* --------------------------------------------------
   Service Selection
-------------------------------------------------- */
.select-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.select-container label {
  margin-bottom: 6px;
}
.select-container select {
  cursor: pointer;
}
#service-selection {
  max-width: 400px;
  margin-bottom: 30px;
}
#customer-details button#submit-new-customer, 
#service-selection button {
  background: var(--booking-base-color);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--booking-border-radius);
  cursor: pointer;
  transition: background 0.3s;
}
#service-selection button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
#customer-details button#submit-new-customer:hover:not(:disabled), 
#service-selection button:hover:not(:disabled) {
  background: var(--booking-highlight-color);
}

/* --------------------------------------------------
   Calendar
-------------------------------------------------- */
#calendar {
  max-width: 600px;
  margin-bottom: 30px;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.month-nav {
  background: none;
  border: none;
  font-size: 1.3em;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s;
}
.month-nav:hover {
  color: var(--booking-base-color);
}
.days-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.day-name {
  text-align: center;
  font-weight: bold;
  padding: 8px 0;
}
.empty-day,
.calendar-day {
  padding: 10px 0;
  text-align: center;
  border-radius: var(--booking-border-radius);
  min-height: 40px;
}
.calendar-day {
  background: #f9f9f9;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
.calendar-day:hover:not(.disabled) {
  background: var(--booking-base-color-light);
  color: var(--booking-text-color);
}
.calendar-day.today {
  border: 2px solid var(--booking-base-color);
}
.calendar-day.selected {
  background: var(--booking-base-color);
  color: #fff;
}
.calendar-day.disabled {
  background: #fafafa;
  color: #ccc;
  cursor: not-allowed;
}

/* --------------------------------------------------
   Time Slots
-------------------------------------------------- */
#time-slots-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 30px;
}
.time-slot {
  padding: 8px;
  border: 1px solid var(--booking-border-color);
  border-radius: var(--booking-border-radius);
  background: #f9f9f9;
  color: var(--booking-base-color);
  cursor: pointer;
  text-align: center;
  transition: background 0.3s, color 0.3s;
  font-size: 14px;
}
.time-slot:hover:not(.disabled) {
  background: var(--booking-base-color-light);
  color: var(--booking-text-color);
}
.time-slot.disabled {
  background: #eee;
  border-color: #ddd;
  color: #999;
  cursor: not-allowed;
}

/* --------------------------------------------------
   Booking Details
-------------------------------------------------- */
#booking-details {
  max-width: 600px;
  margin-bottom: 30px;
}
#booking-details h3 {
  margin-top: 0;
  color: var(--booking-base-color);
}

/* --------------------------------------------------
   Overlay & Popup
-------------------------------------------------- */
#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
}
#popup-form {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--booking-bg-color);
  padding: 20px;
  border-radius: var(--booking-border-radius);
  box-shadow: var(--booking-box-shadow);
  z-index: 1001;
  display: none;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
#popup-form h3 {
  margin-top: 0;
  color: var(--booking-base-color);
}
#booking-form p {
  margin-top: 15px;
  margin-bottom: 15px;
}
#booking-form label {
  display: block;
  margin-bottom: 6px;
}
#booking-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--booking-border-color);
  border-radius: var(--booking-border-radius);
  resize: vertical;
  font-size: 14px;
}

/* Popup form buttons */
#popup-form form button {
  background: var(--booking-base-color);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--booking-border-radius);
  cursor: pointer;
  transition: background 0.3s;
}
#popup-form form button:hover {
  background: var(--booking-highlight-color);
}

/* Submit Booking */
#submit-booking {
  background: var(--booking-base-color);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--booking-border-radius);
  cursor: pointer;
  transition: background 0.3s;
}
#submit-booking:hover {
  background: var(--booking-highlight-color);
}

/* Cancel Booking link */
#cancel-booking {
  margin-left: 12px;
  color: var(--booking-base-color);
  text-decoration: underline;
  cursor: pointer;
}

/* --------------------------------------------------
   Booking Confirmation
-------------------------------------------------- */
#booking-confirmed {
  display: none;
  max-width: 400px;
}
.booking-confirmed {
  background: var(--booking-bg-color);
  padding: 20px;
  border-radius: var(--booking-border-radius);
  box-shadow: var(--booking-box-shadow);
  text-align: center;
}
.booking-confirmed h3 {
  margin-top: 0;
  color: var(--booking-base-color);
}
#booking-refresh {
  background: var(--booking-base-color);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--booking-border-radius);
  cursor: pointer;
  transition: background 0.3s;
}
#booking-refresh:hover {
  background: var(--booking-highlight-color);
}
