/* ==========================================================================
   booking.css - "Schedule a Free SEO Consulting Session" page
   Block: .booking (rebuild of the Fluent Booking calendar widget)
   ========================================================================== */

:root {
  --fcal-primary: #386bb8;
  --fcal-date-radius: 4px;
  --fcal-avatar-radius: 8px;
  --fcal-bg: #ffffff;
  --fcal-border: #d6dae1;
  --fcal-day-bg: #e5e7eb;
  --fcal-disabled: #6b7280;
  --fcal-dark: #1b2533;
  --fcal-input-bg: #ffffff;
}

.booking {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  padding: var(--section-padding);
}

.booking__container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: var(--container-width);
  max-width: 100%;
  margin: 0 auto;
}

.booking__title {
  margin: 0 auto;
  scroll-snap-align: center;
}

.booking__widget {
  width: 100%;
  max-width: 100%;
  padding-top: 0;
}

.booking__widget * {
  box-sizing: border-box;
}

.booking__calendar {
  display: flex;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--fcal-border);
  border-radius: 8px;
  background: var(--fcal-bg);
  transition: all 0.22s ease-out;
}

/* ---------- left column ---------- */
.booking__side {
  width: 360px;
  min-width: 360px;
  max-width: 100%;
  min-height: 450px;
  padding: 1.875rem 2.25rem 1.5rem 1.25rem;
  border-right: 1px solid var(--fcal-border);
  background: var(--fcal-bg);
  overflow: auto;
  z-index: 9;
  transition: all 0.22s ease-out;
}

.booking__host {
  margin-bottom: 10px;
}

.booking__host-avatar {
  margin-bottom: 10px;
}

.booking__host-image {
  display: block;
  width: 5rem;
  height: 5rem;
  object-fit: cover;
  border-radius: var(--fcal-avatar-radius);
}

.booking__host-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--fcal-dark);
}

.booking__event-title {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--fcal-dark);
}

.booking__duration,
.booking__location {
  display: flex;
  column-gap: 0.5rem;
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--fcal-dark);
}

.booking__duration-icon {
  flex: none;
  width: 1rem;
  height: 1rem;
  stroke: #697483;
}

.booking__duration-text {
  margin-top: -0.2rem;
}

.booking__location-icon {
  width: 1rem;
  height: 1rem;
  align-self: center;
}

.booking__description {
  margin-top: 20px;
  font-size: 16px;
  color: var(--fcal-dark);
}

.booking__paragraph {
  margin: 1rem 0;
  line-height: 1.6;
}

/* ---------- right column: dates ---------- */
.booking__dates {
  display: flex;
  align-items: flex-start;
  position: relative;
  min-width: 40%;
  width: 580px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  transition: 0.5s;
}

.booking__dates.is-slots,
.booking__dates.is-details {
  width: 820px;
}

.booking__picker {
  position: relative;
  height: 100%;
  width: 100%;
  flex: none;
  visibility: visible;
  transition: 0.5s;
}

.booking__dates.is-details .booking__picker {
  margin-left: -100%;
  visibility: hidden;
}

.booking__picker-inner {
  display: flex;
  align-items: flex-start;
  column-gap: 40px;
  position: relative;
  transition: 0.3s;
}

.booking__picker-inner.is-active {
  padding-right: 240px;
}

.booking__month {
  position: relative;
  max-width: 540px;
  padding: 30px 20px;
  transition: 0.5s;
}

.booking__picker-inner.is-active .booking__month {
  border-right: 1px solid var(--fcal-border);
}

.booking__month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.booking__month-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--fcal-dark);
}

.booking__month-year {
  color: var(--fcal-disabled);
}

.booking__month-nav {
  display: flex;
}

.booking__month-prev,
.booking__month-next {
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: #6b7280;
  background: none;
  border: none;
}

.booking__month-next {
  color: var(--fcal-primary);
}

.booking__month-prev:disabled,
.booking__month-next:disabled {
  color: #6b7280;
  cursor: not-allowed;
}

.booking__nav-icon {
  width: 16px;
  height: 16px;
}

/* ---------- calendar grid ---------- */
.booking__grid {
  display: grid;
  width: 100%;
  gap: 0.6rem;
  grid-template-columns: repeat(7, minmax(0, 3rem));
  overflow: auto;
  align-items: center;
}

.booking__day-name {
  text-transform: uppercase;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 3;
  color: var(--fcal-dark);
  word-wrap: normal;
}

.booking__day--disabled,
.booking__day--enabled,
.booking__day--empty {
  display: block;
  position: relative;
  z-index: 1;
  padding-top: 100%;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--fcal-disabled);
  cursor: not-allowed;
}

.booking__day--empty {
  cursor: default;
}

.booking__day--enabled {
  color: var(--fcal-dark);
  cursor: pointer;
}

.booking__day-number,
.booking__day-number--today {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fcal-date-radius);
  background-color: #fff;
  transition: 0.3s;
}

.booking__day--enabled .booking__day-number,
.booking__day--enabled .booking__day-number--today {
  color: var(--fcal-dark);
  background-color: var(--fcal-day-bg);
}

.booking__day--enabled:hover .booking__day-number,
.booking__day--enabled:hover .booking__day-number--today,
.booking__day--enabled.is-selected .booking__day-number,
.booking__day--enabled.is-selected .booking__day-number--today {
  background-color: var(--fcal-primary);
  color: #fff;
}

.booking__day--enabled.is-selected .booking__day-number::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #fff;
}

.booking__day-number--today {
  color: var(--fcal-primary);
  z-index: 1;
}

.booking__day-number--today::before {
  content: "";
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  transform: translate(-50%);
  border-radius: var(--fcal-date-radius);
  background: var(--fcal-primary);
  z-index: -1;
}

/* ---------- timezone ---------- */
.booking__timezone {
  max-width: 100%;
  margin-top: 30px;
  padding-left: 1px;
}

.booking__timezone-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--fcal-dark);
}

.booking__timezone-select {
  position: relative;
  display: flex;
  align-items: center;
  height: 42px;
  padding-left: 20px;
  border: 1px solid var(--fcal-border);
  border-radius: 8px;
  background: var(--fcal-input-bg);
  color: var(--fcal-dark);
  cursor: not-allowed;
}

.booking__timezone-select::before {
  content: "";
  position: absolute;
  right: 15px;
  top: 13px;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--fcal-border);
  border-bottom: 2px solid var(--fcal-border);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: 0.3s;
}

.booking__timezone-value {
  font-size: 1rem;
  color: #9ca3af;
}

.booking__timezone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: not-allowed;
}

/* ---------- time slots ---------- */
.booking__slots {
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  padding: 0 20px 20px 0;
  background: var(--fcal-bg);
  visibility: hidden;
  opacity: 0;
  transition: 0.5s;
}

.booking__slots.is-active {
  visibility: visible;
  opacity: 1;
  height: 100%;
  overflow: auto;
}

.booking__slots.is-active::-webkit-scrollbar { width: 6px; }
.booking__slots.is-active::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 10px; }

.booking__slots-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 30px 0 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fcal-dark);
  background: var(--fcal-bg);
}

.booking__slots-header .booking__back {
  display: none;
}

.booking__slots-date {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fcal-dark);
}

.booking__slots-format {
  display: flex;
  align-items: center;
  padding: 0.25rem;
  border: 1px solid var(--fcal-border);
  border-radius: 8px;
}

.booking__format {
  overflow: hidden;
}

.booking__format-button,
.booking__format-button--active {
  display: block;
  width: 40px;
  padding: 5.6px 4px;
  border-radius: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--fcal-dark);
  font-size: 14px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.booking__format-button--active {
  color: #2b2b2b;
  background: #e5e7eb;
}

.booking__slots-list {
  margin: 0;
  padding: 0;
}

.booking__slot {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2px 2px 2px 0;
  border: 1px solid var(--fcal-border);
  border-radius: 4px;
  background: var(--fcal-input-bg);
  transition: 0.3s;
}

.booking__slot + .booking__slot {
  margin-top: 15px;
}

.booking__slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 4px;
  background: var(--fcal-primary);
  opacity: 0;
}

.booking__slot:hover,
.booking__slot.is-selected {
  border-color: var(--fcal-primary);
}

.booking__slot:hover::before,
.booking__slot.is-selected::before {
  opacity: 0.1;
}

.booking__slot-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  width: 100%;
  padding: 10px 15px;
  background: none;
  border: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
  color: var(--fcal-dark);
  text-align: inherit;
  cursor: pointer;
}

.booking__slot:hover .booking__slot-time,
.booking__slot.is-selected .booking__slot-time {
  color: var(--fcal-primary);
}

.booking__slot.is-selected .booking__slot-time {
  font-weight: 700;
}

.booking__slot-confirm {
  display: none;
  flex: none;
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  background: var(--fcal-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  cursor: pointer;
}

.booking__slot.is-selected .booking__slot-confirm {
  display: block;
}

/* ---------- details form (slides in after confirming a slot) ---------- */
.booking__details {
  position: absolute;
  top: 0;
  right: -100%;
  z-index: 10;
  flex: none;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 24px 20px;
  background: var(--fcal-bg);
  opacity: 0;
  visibility: hidden;
  overflow-x: hidden;
  overflow-y: auto;
  transition: 0.5s;
}

.booking__dates.is-details .booking__details {
  position: relative;
  right: 0;
  opacity: 1;
  visibility: visible;
}

.booking__details-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--fcal-border);
}

.booking__details-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--fcal-dark);
}

.booking__back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #90949c;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: 0.3s;
}

.booking__back-icon {
  width: 18px;
  fill: var(--fcal-dark);
  transition: 0.3s;
}

.booking__back-button:hover {
  background: var(--fcal-primary);
  border-color: var(--fcal-primary);
}

.booking__back-button:hover .booking__back-icon {
  fill: #fff;
}

.booking__summary {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--fcal-dark);
}

.booking__field {
  margin-bottom: 16px;
}

.booking__label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fcal-dark);
}

.booking__required {
  color: #f56c6c;
}

.booking__input,
.booking__textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--fcal-border);
  border-radius: 8px;
  background: var(--fcal-input-bg);
  color: var(--fcal-dark);
  font-size: 15px;
  line-height: 1.5;
}

.booking__input:focus,
.booking__textarea:focus {
  border-color: var(--fcal-primary);
  outline: 0;
}

.booking__textarea {
  min-height: 100px;
  resize: vertical;
}

.booking__submit {
  display: inline-block;
  padding: 10px 20px;
  border: 0;
  border-radius: 4px;
  background: var(--fcal-primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.booking__submit:hover {
  opacity: 0.9;
}

.booking__notice {
  display: none;
  margin-top: 12px;
  font-size: 14px;
  color: var(--fcal-dark);
}

.booking__notice.is-visible {
  display: block;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .booking__dates.is-slots,
  .booking__dates.is-details {
    width: 580px;
  }
  .booking__picker-inner.is-active {
    padding-right: 0;
  }
  .booking__picker-inner.is-active .booking__month {
    opacity: 0;
    visibility: hidden;
    margin-left: -100%;
  }
  .booking__slots {
    width: 100%;
    padding: 0 20px 20px;
  }
  .booking__slots-header .booking__back {
    display: block;
  }
  .booking__back-button {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 663px) {
  .booking__calendar {
    flex-direction: column;
    width: 100%;
  }
  .booking__side {
    width: 100%;
    min-width: 100%;
    min-height: auto;
    height: auto;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--fcal-border);
  }
  .booking__dates,
  .booking__dates.is-slots,
  .booking__dates.is-details {
    width: 100%;
    min-width: 100%;
  }
  .booking__month {
    max-width: 100%;
  }
  .booking__details {
    right: 0;
    position: relative;
  }
}
