/**
 * @file
 * Booking calendar widget styles.
 *
 * Inherits the site typography (no font-family declarations) but ships its own
 * modern, minimalist look for the interactive elements.
 */

.custom-booking-widget {
  --cb-accent: #2f6df6;
  --cb-accent-soft: rgba(47, 109, 246, 0.12);
  --cb-border: #e4e7ec;
  --cb-text-muted: #667085;
  --cb-radius: 12px;
  --cb-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);

  max-width: 640px;
  margin: 0 auto;
  color: inherit;
}

.custom-booking-widget *,
.custom-booking-widget *::before,
.custom-booking-widget *::after {
  box-sizing: border-box;
}

.custom-booking-widget__title {ß
  margin: 0 0 1rem;
  font-size: 1.4rem;
  line-height: 1.3;
}

/* Month navigation -------------------------------------------------------- */
.custom-booking-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.custom-booking-nav__label {
  font-weight: 600;
  font-size: 1.05rem;
}

.custom-booking-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--cb-accent);
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.custom-booking-nav__btn:hover:not(:disabled) {
  background: var(--cb-accent-soft);
  transform: translateY(-1px);
  box-shadow: var(--cb-shadow);
}

.custom-booking-nav__btn:disabled,
.custom-booking-nav__btn.is-disabled {
  opacity: 0.35;
  cursor: default;
}

/* Sections ---------------------------------------------------------------- */
.custom-booking-section__heading {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cb-text-muted);
}

/* Daily strip: 4 day columns --------------------------------------------- */
.custom-booking-days {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
  align-items: start;
}

.custom-booking-day-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.custom-booking-day-col__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.6rem 0.25rem;
  margin-bottom: 0.625rem;
  text-align: center;
  background: var(--cb-accent-soft);
  border-radius: var(--cb-radius);
}

.custom-booking-day-col__weekday {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cb-text-muted);
}

.custom-booking-day-col__date {
  font-size: 0.98rem;
  font-weight: 700;
}

.custom-booking-day-col__slots {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Time slot buttons ------------------------------------------------------- */
.custom-booking-slot {
  width: 100%;
  padding: 0.55rem 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: #1d2939;
  background: #fff;
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.custom-booking-slot:hover {
  border-color: var(--cb-accent);
  transform: translateY(-2px);
  box-shadow: var(--cb-shadow);
}

.custom-booking-slot.is-selected {
  color: #fff;
  background: var(--cb-accent);
  border-color: var(--cb-accent);
}

/* No online schedule — book by phone -------------------------------------- */
.custom-booking-phone-notice {
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--cb-accent-soft, rgba(47, 109, 246, 0.12));
  border-radius: var(--cb-radius, 12px);
}

.custom-booking-phone-notice__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: #1d2939;
}

/* Hide “choose a time” lead when only the phone notice is shown. */
.bprofile__section--booking:has(.custom-booking-phone-notice) .bprofile__booking-lead {
  display: none;
}

/* States ------------------------------------------------------------------ */
.custom-booking-status {
  display: none;
  margin: 0;
  padding: 0.5rem 0;
  color: var(--cb-text-muted);
  font-size: 0.95rem;
}

.custom-booking-empty {
  margin: 0;
  padding: 0.5rem 0.25rem;
  text-align: center;
  color: var(--cb-text-muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

/* Appointment form -------------------------------------------------------- */
.custom-booking-form {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cb-border);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-booking-form.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.custom-booking-form__selected {
  margin: 0 0 1rem;
  padding: 0.6rem 0.85rem;
  font-weight: 600;
  color: var(--cb-accent);
  background: var(--cb-accent-soft);
  border-radius: var(--cb-radius);
}

.custom-booking-form .form-item {
  margin-bottom: 0.85rem;
}

.custom-booking-form input[type="text"],
.custom-booking-form input[type="email"],
.custom-booking-form input[type="tel"] {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--cb-border);
  border-radius: 10px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.custom-booking-form input[type="text"]:focus,
.custom-booking-form input[type="email"]:focus,
.custom-booking-form input[type="tel"]:focus {
  outline: none;
  border-color: var(--cb-accent);
  box-shadow: 0 0 0 3px var(--cb-accent-soft);
}

.custom-booking-submit {
  padding: 0.7rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--cb-accent);
  border: none;
  border-radius: var(--cb-radius);
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.custom-booking-submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* Success message --------------------------------------------------------- */
.custom-booking-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  animation: cb-fade-in 0.4s ease;
}

.custom-booking-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 1.6rem;
  color: #fff;
  background: #12b76a;
  border-radius: 50%;
}

.custom-booking-success__text {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

@keyframes cb-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 600px) {
  /* Keep all 4 days on screen, just tighten spacing and type. */
  .custom-booking-days {
    gap: 0.4rem;
  }

  .custom-booking-day-col__header {
    padding: 0.45rem 0.15rem;
  }

  .custom-booking-day-col__date {
    font-size: 0.85rem;
  }

  .custom-booking-slot {
    padding: 0.45rem 0.2rem;
    font-size: 0.8rem;
  }
}
