/**
 * Expo Stall Booking – frontend styles
 */

.esb-booking {
  --esb-primary: #0B254C;
  --esb-accent: #F7B316;
  --esb-hover: #053788;
  --esb-bg: #f5f8fc;
  --esb-border: #d1dff7;
  --esb-error: #c0392b;
  --esb-radius: 8px;
  font-family: "FuturaPT-Book", "Segoe UI", sans-serif;
  color: var(--esb-primary);
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.esb-booking__layout {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(320px, 560px);
  gap: 2rem;
  align-items: start;
  justify-content: center;
}

.esb-booking__layout--single {
  grid-template-columns: minmax(320px, 760px);
}

.esb-booking__layout--single .esb-booking__form-col {
  width: 100%;
}

.esb-booking__form-col,
.esb-booking__summary-col {
  min-height: 720px;
}

.esb-booking__form-col {
  background: #fff;
  border: 1px solid var(--esb-border);
  border-radius: 12px;
  padding: 2rem;
}

.esb-booking__form,
.esb-booking__form * {
  font-size: 16px;
}

@media (max-width: 991px) {
  .esb-booking__layout {
    grid-template-columns: 1fr;
  }

  .esb-booking {
    padding: 1.25rem 1rem;
  }

  .esb-booking__form-col,
  .esb-booking__summary-col {
    min-height: auto;
  }

  .esb-booking__form-col {
    padding: 1.25rem;
  }
}

.esb-booking__title {
  font-family: "FuturaPT-Bold", "Segoe UI", sans-serif;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #022856;
}

.esb-field {
  margin-bottom: 1rem;
}

.esb-field label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.esb-field input,
.esb-field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--esb-border);
  border-radius: var(--esb-radius);
  font-size: 16px;
  background: #fff;
  color: var(--esb-primary);
}

.esb-field select option {
  font-size: 16px;
}

.esb-field input:focus,
.esb-field select:focus {
  outline: none;
  border-color: var(--esb-hover);
  box-shadow: 0 0 0 3px rgba(5, 55, 136, 0.12);
}

.esb-booth-sizes {
  border: none;
  margin: 1.25rem 0;
  padding: 0;
}

.esb-booth-sizes legend {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.esb-booth-sizes__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.esb-booth-size {
  cursor: pointer;
}

.esb-booth-size input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.esb-booth-size span {
  display: inline-block;
  min-width: 3rem;
  padding: 0.5rem 0.85rem;
  border: 2px solid var(--esb-border);
  border-radius: var(--esb-radius);
  text-align: center;
  font-weight: 600;
  transition: all 0.2s ease;
}

.esb-booth-size input:checked + span,
.esb-booth-size:hover span {
  border-color: var(--esb-hover);
  background: var(--esb-bg);
  color: var(--esb-hover);
}

.esb-area-display {
  font-size: 20px;
  margin: 0.5rem 0 1rem;
}

.esb-error {
  color: var(--esb-error);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.esb-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: var(--esb-radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.esb-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.esb-btn--primary {
  background: var(--esb-primary);
  color: #fff;
}

.esb-btn--primary:hover:not(:disabled) {
  background: var(--esb-hover);
}

.esb-btn--pay {
  background: var(--esb-accent);
  color: #000;
  width: 100%;
  margin-top: 1rem;
}

.esb-btn--pay:hover:not(:disabled) {
  background: #e5a50f;
}

.esb-btn--secondary {
  background: var(--esb-bg);
  color: var(--esb-primary);
  border: 1px solid var(--esb-border);
}

.esb-summary {
  background: var(--esb-bg);
  border: 1px solid var(--esb-border);
  border-radius: var(--esb-radius);
  padding: 1.5rem;
}

.esb-summary h3 {
  margin-top: 0;
  font-size: 1.25rem;
}

.esb-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0;
}

.esb-summary__row--total {
  font-size: 1.15rem;
  font-weight: 700;
}

.esb-summary__note {
  font-size: 0.8rem;
  color: #666;
  margin: 0.25rem 0 1rem;
}

.esb-summary hr {
  border: none;
  border-top: 1px solid var(--esb-border);
  margin: 1rem 0;
}

.esb-token-title {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.75rem;
}

.esb-benefits {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.esb-benefits li {
  margin-bottom: 0.5rem;
}

.esb-hidden {
  display: none !important;
}

.esb-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.esb-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.esb-modal__content {
  position: relative;
  background: #fff;
  border-radius: var(--esb-radius);
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.esb-modal__booking-id {
  font-size: 1.1rem;
  margin: 1rem 0 1.5rem;
}

.esb-loader {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: var(--esb-radius);
}

.esb-loader__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--esb-border);
  border-top-color: var(--esb-hover);
  border-radius: 50%;
  animation: esb-spin 0.8s linear infinite;
}

@keyframes esb-spin {
  to {
    transform: rotate(360deg);
  }
}
