/**
 * Виджет бронирования: светлая «премиальная» тема, шрифт Plus Jakarta Sans
 * (подключается в widget.html поверх style.css)
 */
:root {
  --w-ink: #0f172a;
  --w-muted: #64748b;
  --w-surface: #ffffff;
  --w-cream: #faf8f5;
  --w-accent: #ea580c;
  --w-accent-deep: #c2410c;
  --w-ring: rgba(234, 88, 12, 0.28);
  --w-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 22px 50px -12px rgba(234, 88, 12, 0.14);
  --w-shadow-hover: 0 12px 40px -8px rgba(234, 88, 12, 0.22);
}

.widget-body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--w-ink);
  background: linear-gradient(168deg, #fffefb 0%, #faf6f0 38%, #f3ece4 100%);
  -webkit-font-smoothing: antialiased;
}

/* Мягкое свечение на фоне */
.widget-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 100% -10%, rgba(234, 88, 12, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at -15% 80%, rgba(14, 116, 144, 0.06) 0%, transparent 50%);
}

.widget-shell {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
  padding: calc(1rem + env(safe-area-inset-top, 0)) 0.9rem 1.5rem;
  overflow-x: clip;
}

.widget-header {
  text-align: center;
  margin-bottom: 1rem;
  padding-top: 0.15rem;
}

.widget-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--w-accent-deep);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95) 0%, rgba(255, 237, 213, 0.9) 100%);
  border: 1px solid rgba(234, 88, 12, 0.22);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.widget-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.035em;
  line-height: 1.15;
  background: linear-gradient(125deg, #0f172a 0%, #334155 55%, #ea580c 160%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.widget-tagline {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--w-muted);
  line-height: 1.45;
}

/* Карточка формы */
.widget-body .booking-form.widget-booking-form {
  margin: 0;
  background: var(--w-surface);
  border-radius: 22px;
  padding: 1.35rem 1.2rem 1.45rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--w-shadow);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.widget-body .booking-form.widget-booking-form:hover {
  box-shadow: var(--w-shadow), var(--w-shadow-hover);
}

.widget-h2 {
  margin: 0 0 1.1rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--w-ink);
  letter-spacing: -0.02em;
}

.widget-body .field {
  margin-bottom: 1rem;
  min-width: 0;
}

/* iOS/WebView: нативный input[type=date] часто имеет огромную min-width и вылезает за карточку */
.widget-body .field input[type="date"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.widget-body .field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

.widget-body .field input,
.widget-body .field select,
.widget-body .field textarea {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fafafa;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
}

.widget-body .field input:hover,
.widget-body .field select:hover,
.widget-body .field textarea:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.widget-body .field input:focus,
.widget-body .field select:focus,
.widget-body .field textarea:focus {
  outline: none;
  border-color: var(--w-accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--w-ring);
}

.widget-body .hint {
  color: var(--w-muted);
  font-size: 0.8rem;
}

/* Слоты времени */
.widget-body .slot {
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}

.widget-body .slot.slot-free {
  background: linear-gradient(180deg, #fffdfb 0%, #fff8f3 100%);
  border-color: rgba(234, 88, 12, 0.35);
  color: var(--w-accent-deep);
}

.widget-body .slot.slot-free:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.2);
}

.widget-body .slot.selected {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.45);
}

/* Кнопка отправки */
.widget-body button#submit {
  font-family: inherit;
  border-radius: 14px;
  padding: 0.95rem 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 45%, #c2410c 100%);
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.widget-body button#submit:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 32px rgba(234, 88, 12, 0.42);
}

.widget-body button#submit:active:not(:disabled) {
  transform: translateY(-1px) scale(1);
}

/* Модалка «Спасибо» внутри виджета */
.widget-body .thank-modal {
  z-index: 300;
}

.widget-body .thank-backdrop {
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.widget-body .thank-box {
  font-family: inherit;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--w-shadow);
  animation: widgetThankIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.widget-body .thank-text {
  color: var(--w-muted);
  font-size: 0.95rem;
}

@keyframes widgetThankIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.widget-body .thank-title {
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.widget-body .thank-btn {
  font-family: inherit;
  border-radius: 12px;
}

.widget-body .price-text {
  font-weight: 600;
  color: var(--w-accent-deep);
}

/* Подсказка «нужно N дорожек» — компактно, красная пульсация */
.widget-body .availability-lanes-hint {
  color: #dc2626;
  font-size: 0.74rem;
  font-weight: 600;
  animation: widget-lanes-hint-pulse 1.65s ease-in-out infinite;
}
@keyframes widget-lanes-hint-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.widget-body .availability-zone-acc {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(15, 23, 42, 0.08);
}
.widget-body .availability-zone-summary {
  font-family: inherit;
}
.widget-body .availability-item {
  font-family: inherit;
}
