/**
 * PAGE: booking (meeting scheduler)
 */

.booking-section {
  background: #f8fafc;
  padding: 2rem 0 5rem;
}

@media (min-width: 1024px) {
  .booking-section {
    padding: 3rem 0 6rem;
  }
}

.booking-app {
  border-radius: 2rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 20px 25px rgba(15, 23, 42, 0.06);
}

@media (min-width: 768px) {
  .booking-app {
    padding: 2rem 2.5rem;
  }
}

.booking-app__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .booking-app__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.booking-step-title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 900;
  color: #0f172a;
}

.booking-step-title--sm {
  font-size: 1rem;
  margin-top: 1.5rem;
}

.booking-calendar-card {
  border-radius: 1.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 1rem;
}

.booking-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.booking-cal-month {
  font-size: 1.125rem;
  font-weight: 900;
  color: #0f172a;
}

.booking-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.booking-cal-btn:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
}

.icon-mirror-x {
  transform: scaleX(-1);
}

.booking-cal-weekdays,
.booking-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.booking-cal-weekdays span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
  padding: 0.25rem 0;
}

.booking-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: none;
  border-radius: 9999px;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.booking-cal-day:hover:not(:disabled) {
  background: #eff6ff;
  color: #2563eb;
}

.booking-cal-day.is-selected {
  background: #2563eb;
  color: #fff;
}

.booking-cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 2px #93c5fd;
}

.booking-cal-day:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.booking-cal-day--empty {
  visibility: hidden;
  pointer-events: none;
}

.booking-cal-day.has-slot::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
}

.booking-cal-day.is-selected.has-slot::after {
  background: #fff;
}

.booking-cal-hint {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
}

.booking-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .booking-slots {
    grid-template-columns: repeat(4, 1fr);
  }
}

.booking-slot {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.625rem 0.25rem;
  font-size: 0.875rem;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.booking-slot:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #2563eb;
}

.booking-slot.is-selected {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.booking-slot:disabled {
  background: #f1f5f9;
  color: #cbd5e1;
  cursor: not-allowed;
}

.booking-slots-empty {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #64748b;
}

.booking-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.booking-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 1.25rem;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.booking-type:hover {
  border-color: #93c5fd;
}

.booking-type.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.booking-type__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: #dbeafe;
}

.booking-type.is-selected .booking-type__icon .icon {
  color: #1d4ed8;
}

.booking-type__title {
  font-size: 0.9375rem;
  font-weight: 900;
  color: #0f172a;
}

.booking-type__desc {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.3;
}

.booking-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.booking-field span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 900;
  color: #334155;
}

.booking-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.booking-field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.booking-field input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.booking-app__footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.booking-submit {
  width: 100%;
  position: relative;
}

@media (min-width: 640px) {
  .booking-submit {
    width: auto;
    min-width: 16rem;
  }
}

.booking-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

.booking-spinner {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  margin-inline-start: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: booking-spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes booking-spin {
  to {
    transform: rotate(360deg);
  }
}

.booking-success {
  text-align: center;
  padding: 2rem 1rem;
}

.booking-success__icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.5rem;
  background: #dbeafe;
}

.booking-success__title {
  margin: 0 0 0.75rem;
  font-size: 1.75rem;
  font-weight: 900;
  color: #0f172a;
}

.booking-success__text {
  margin: 0 auto 1.5rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
}

.booking-success__meta {
  margin: 0 auto 2rem;
  max-width: 20rem;
  display: grid;
  gap: 0.5rem;
  text-align: right;
}

.booking-success__meta div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9375rem;
}

.booking-success__meta dt {
  font-weight: 700;
  color: #64748b;
}

.booking-success__meta dd {
  margin: 0;
  font-weight: 900;
  color: #0f172a;
}

.booking-success__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 20rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .booking-success__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    max-width: none;
  }

  .booking-success__actions .btn-wms {
    width: auto;
  }
}

.booking-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15);
}

.booking-toast.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.booking-toast.is-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
