/* =============================================================
   BOOKING FORM — STYLES  (4-step wizard)
   TheChaniaTransfer · Accent: #e2b13c
   ============================================================= */

/* ---------- Reset & Base (scoped to widget) ---------- */
.booking-wrapper *,
.booking-wrapper *::before,
.booking-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.booking-wrapper {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: #333;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Floating Action Button ---------- */
.sts-booking-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999998 !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a2e;
  background: #e2b13c;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(226, 177, 60, 0.45);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sts-booking-fab:hover {
  background: #d4a12e;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(226, 177, 60, 0.55);
}

.sts-booking-fab:active {
  transform: scale(0.97);
}

.sts-booking-fab svg {
  flex-shrink: 0;
}

/* ---------- Modal Overlay ---------- */
.sts-booking-overlay {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  overflow-y: auto !important;
  padding: 34px 24px !important;
  box-sizing: border-box !important;
}

.sts-booking-overlay.open {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  animation: stsFadeIn 0.2s ease;
}

@keyframes stsFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Modal Container ---------- */
.sts-booking-modal {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 24px auto;
  animation: stsSlideUp 0.25s ease;
}

@keyframes stsSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Close Button ---------- */
.sts-booking-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}

.sts-booking-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- Wrapper ---------- */
.booking-wrapper {
  max-width: 860px;
  margin: 66px auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e7eaf0;
  box-shadow: 0 22px 54px rgba(20, 29, 52, 0.14);
  overflow: visible;
}

.sts-booking-modal .booking-wrapper {
  max-width: 100%;
  margin: 0 auto;
}

/* ---------- Header ---------- */
.booking-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #f8fbff;
  text-align: center;
  padding: 36px 30px 28px;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

.booking-header h2 {
  font-size: 1.58rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #ffffff !important;
}

.booking-header p {
  font-size: 0.92rem;
  opacity: 1;
  color: #d9e3f5 !important;
}

.booking-header,
.booking-header * {
  color: inherit;
}

/* ---------- Stepper ---------- */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 34px 12px;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  position: relative;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #999;
  background: #fff;
  transition: all 0.3s;
}

.step-label {
  font-size: 0.7rem;
  color: #999;
  font-weight: 500;
  transition: color 0.3s;
}

.step-item.active .step-circle,
.step-item.done .step-circle {
  border-color: #e2b13c;
  background: #e2b13c;
  color: #1a1a2e;
}

.step-item.active .step-label,
.step-item.done .step-label {
  color: #1a1a2e;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin: 0 10px;
  margin-bottom: 18px;
  transition: background 0.3s;
}

.step-line.done {
  background: #e2b13c;
}

/* ---------- Form ---------- */
form {
  padding: 40px 48px 46px;
}

/* ---------- Steps (show/hide) ---------- */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Fieldset / Legend ---------- */
fieldset,
.extras-fieldset {
  border: none;
  margin-bottom: 14px;
}

legend {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2b13c;
  width: 100%;
}

/* ---------- Rows & Groups ---------- */
.form-row {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
}

.form-row .form-group {
  flex: 1;
}

.form-row.four-col .form-group {
  flex: 1;
}

.form-group.full-width {
  width: 100%;
  margin-bottom: 16px;
}

/* ---------- Labels ---------- */
label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 4px;
  color: #444;
}

.req {
  color: #e74c3c;
}

/* ---------- Inputs & Selects ---------- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.88rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fafbfc;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #e2b13c;
  box-shadow: 0 0 0 3px rgba(226, 177, 60, 0.18);
}

input.invalid,
select.invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

/* native select arrow is handled in enhanced section above */

textarea {
  resize: vertical;
  min-height: 60px;
}

/* ---------- Custom Searchable Dropdown ---------- */
.custom-select {
  position: relative;
}

.custom-select-trigger {
  width: 100%;
  padding: 10px 36px 10px 12px;
  font-size: 0.88rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fafbfc;
  color: #333;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  position: relative;
}

.custom-select-trigger.placeholder {
  color: #999;
}

.custom-select-trigger::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #888;
  transition: transform 0.2s;
  pointer-events: none;
}

.custom-select.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select.open .custom-select-trigger,
.custom-select-trigger:focus {
  border-color: #e2b13c;
  box-shadow: 0 0 0 3px rgba(226, 177, 60, 0.18);
}

.custom-select-trigger.invalid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.custom-select-panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  overflow: hidden;
  animation: dropIn 0.15s ease;
}

.custom-select.open .custom-select-panel {
  display: block;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.custom-select-search {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.85rem;
  border: none;
  border-bottom: 1px solid #eee;
  outline: none;
  background: #f9fafb;
  border-radius: 0;
}

.custom-select-search::placeholder {
  color: #bbb;
}

.custom-select-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
}

.custom-select-list::-webkit-scrollbar {
  width: 6px;
}

.custom-select-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

.custom-select-option {
  padding: 10px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.12s;
  color: #333;
}

.custom-select-option:hover,
.custom-select-option.highlighted {
  background: #fff8e1;
  color: #1a1a2e;
}

.custom-select-option.selected {
  background: #e2b13c;
  color: #1a1a2e;
  font-weight: 600;
}

.custom-select-option.cs-hidden {
  display: none;
}

.custom-select-empty {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: #aaa;
  text-align: center;
  font-style: italic;
}

/* ---------- Enhanced native selects ---------- */
select {
  background-color: #fafbfc;
  background-image:
    linear-gradient(to bottom, #fafbfc, #f3f4f6),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e2b13c' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 12px center;
  background-size: 100% 100%, 12px 8px;
  padding-right: 34px;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

select:hover {
  border-color: #c5c9d0;
}

/* ---------- Address sub-field ---------- */
.address-field {
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
  border: 1px dashed #d1d5db;
  background: #fff;
  border-radius: 6px;
}

.address-field::placeholder {
  color: #aaa;
  font-style: italic;
}

.address-field:focus {
  border-style: solid;
  border-color: #e2b13c;
}

.address-field.hidden {
  display: none;
}

/* ---------- Time select (mobile-friendly) ---------- */
.time-select {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-select .custom-select-sm {
  flex: 1;
  min-width: 0;
}

.time-sep {
  font-size: 1.1rem;
  font-weight: 700;
  color: #666;
  line-height: 1;
  user-select: none;
}

/* ---------- Small custom select variant ---------- */
.custom-select-sm .custom-select-trigger {
  text-align: center;
  padding: 10px 28px 10px 10px;
  font-size: 0.88rem;
}

.custom-select-sm .custom-select-panel {
  min-width: 70px;
}

.custom-select-sm .custom-select-list {
  max-height: 180px;
}

.custom-select-sm .custom-select-option {
  text-align: center;
  padding: 9px 10px;
  font-size: 0.86rem;
}

/* ---------- Route Error ---------- */
.route-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  text-align: center;
}

/* ---------- Compact Radio (Step 1) ---------- */
.radio-group-compact {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.radio-label-compact {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fafbfc;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
  white-space: nowrap;
}

.radio-label-compact:hover {
  border-color: #e2b13c;
}

.radio-label-compact input {
  accent-color: #e2b13c;
  margin: 0;
  width: 13px;
  height: 13px;
}

.radio-label-compact:has(input:checked) {
  border-color: #e2b13c;
  background: #fffbeb;
}

/* ---------- Step intro ---------- */
.step-intro {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 14px;
}

/* ---------- Car Grid ---------- */
.car-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.car-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  background: #fafbfc;
}

.car-card:hover {
  border-color: #e2b13c;
  box-shadow: 0 4px 16px rgba(226, 177, 60, 0.15);
  transform: translateY(-2px);
}

.car-card.selected {
  border-color: #e2b13c;
  box-shadow: 0 0 0 3px rgba(226, 177, 60, 0.22);
  background: #fffdf5;
}

.car-card.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.car-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: #eee;
}

.car-info {
  padding: 10px 12px 12px;
}

.car-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.car-desc {
  font-size: 0.75rem;
  color: #777;
  margin-bottom: 6px;
}

.car-specs {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  color: #555;
}

.car-specs span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.car-price-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: #e2b13c;
  margin-top: 6px;
}

.car-selected-badge {
  display: none;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: #e2b13c;
  padding: 2px 8px;
  border-radius: 4px;
  float: right;
  margin-top: -2px;
}

.car-card.selected .car-selected-badge {
  display: inline-block;
}

/* ---------- Checkbox Group (extras) ---------- */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fafbfc;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.checkbox-label:hover {
  border-color: #e2b13c;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  width: 16px;
  height: 16px;
  border: 2px solid #bbb;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.checkbox-label input:checked ~ .checkbox-custom {
  background: #e2b13c;
  border-color: #e2b13c;
}

.checkbox-label input:checked ~ .checkbox-custom::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 3px;
  width: 6px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.extra-price {
  font-size: 0.76rem;
  font-weight: 600;
  color: #e2b13c;
  margin-left: 3px;
}

.checkbox-label:has(input:checked) {
  border-color: #e2b13c;
  background: #fffbeb;
}

/* ---------- Review Card ---------- */
.review-card {
  background: #f8f9fb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  line-height: 1.7;
}

.review-card .review-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.review-card .review-label {
  color: #888;
  font-weight: 500;
}

.review-card .review-value {
  font-weight: 600;
  color: #1a1a2e;
  text-align: right;
}

.review-card .review-divider {
  border: none;
  border-top: 1px dashed #ddd;
  margin: 8px 0;
}

/* ---------- Price Box ---------- */
.price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #f8fbff;
  border-radius: 10px;
  padding: 16px 22px;
  margin-bottom: 0;
  margin-top: 14px;
}

.price-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 1;
  color: #d9e3f5 !important;
}

.price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f2c450 !important;
}

.price-box,
.price-box * {
  color: inherit;
}

/* ---------- Navigation Buttons ---------- */
.step-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 36px;
  gap: 12px;
}

.btn-nav {
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-prev {
  background: #e5e7eb;
  color: #444;
}

.btn-prev:hover {
  background: #d1d5db;
}

.btn-next {
  background: #e2b13c;
  color: #1a1a2e;
  margin-left: auto;
}

.btn-next:hover {
  background: #d4a12e;
}

.btn-nav:active {
  transform: scale(0.97);
}

/* ---------- Submit Button ---------- */
.btn-submit {
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1a1a2e;
  background: #e2b13c;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
  margin-left: auto;
}

.btn-submit:hover {
  background: #d4a12e;
}

.btn-submit:active {
  transform: scale(0.97);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loader {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(26, 26, 46, 0.25);
  border-top-color: #1a1a2e;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .sts-booking-fab span {
    display: none;
  }

  .sts-booking-fab {
    padding: 16px;
    border-radius: 50%;
  }

  .sts-booking-overlay {
    padding: 10px 0;
  }

  .sts-booking-modal {
    margin: 0;
    max-width: 100%;
  }

  .booking-wrapper {
    margin: 20px 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
  }

  form {
    padding: 24px 18px 28px;
  }

  .stepper {
    padding: 16px 12px 8px;
  }

  .step-label {
    font-size: 0.62rem;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }

  .form-row,
  .form-row.four-col {
    flex-direction: column;
    gap: 10px;
  }

  .car-grid {
    grid-template-columns: 1fr;
  }

  .checkbox-group {
    flex-direction: column;
    gap: 8px;
  }

  .price-box {
    flex-direction: column;
    text-align: center;
    gap: 4px;
    padding: 14px 16px;
  }

  .price-value {
    font-size: 1.3rem;
  }

  .booking-header h2 {
    font-size: 1.25rem;
  }

  .step-nav {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .btn-nav,
  .btn-submit {
    width: 100%;
    text-align: center;
    margin-left: 0;
  }
}
