/* =========================
   RTB – CSS COMPLETO (ALINEACIÓN BOTONES CONTROLABLE DESDE ELEMENTOR)
   Pega este CSS entero en tu widget
   ========================= */

/* Global box sizing safety */
.rtb-booking-wrapper,
.rtb-booking-wrapper * {
  box-sizing: border-box;
}

/* Main Wrapper */
.rtb-booking-wrapper {
  width: 100%;
  max-width: 100%;
  /* Retoque estético mínimo: más aire interior */
  padding: 28px 30px;
}

/* Extra safety */
.rtb-booking-form,
.rtb-step {
  max-width: 100%;
}

/* Progress Bar */
.rtb-progress-bar {
  display: flex;
  justify-content: space-between;
  /* Retoque: ajuste de espacio */
  margin-bottom: 26px;
  border-bottom: 2px solid #eee;
}

.rtb-progress-step {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  margin-bottom: -2px;
  cursor: default;
}

/* Steps Visibility */
.rtb-step {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.rtb-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Layout Grid */
.rtb-booking-form h3 {
  /* Retoque: menos bloque y mejor respiración */
  margin-bottom: 18px;
  line-height: 1.25;
}

.rtb-form-group {
  /* Retoque: aire entre bloques */
  margin-bottom: 22px;
  position: relative;
}

.rtb-row {
  display: flex;
  /* Retoque: un pelín más compacto y equilibrado */
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.rtb-col {
  flex: 1;
  min-width: 200px;
  position: relative;
  min-width: 0; /* clave para evitar overflow en flex */
}

/* Inputs & Labels */
label {
  display: block;
  /* Retoque: un poco más compacto */
  margin-bottom: 15px !important;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  outline: none;
  transition: all 0.3s;
}

/* Retoque estético mínimo: padding/altura inputs para sensación más cómoda */
.rtb-booking-wrapper input:not([type="checkbox"]):not([type="radio"]),
.rtb-booking-wrapper select,
.rtb-booking-wrapper textarea {
  padding: 14px 16px;
  line-height: 1.2;
  border-radius: 14px; /* si no quieres redondeo, baja a 10px o elimina */
}

/* Textarea: un poco más alta */
.rtb-booking-wrapper textarea {
  min-height: 110px;
  resize: vertical;
}

/* Placeholder */
.rtb-booking-wrapper ::placeholder {
  opacity: 0.85;
}

/* Error Messages */
.rtb-error-message {
  display: none;
  font-size: 0.85em;
  color: #d9534f;
  /* Retoque: separación consistente */
  margin-top: 6px;
}

.rtb-input-error {
  border-color: #d9534f !important;
}

/* =========================
   BUTTONS – CONTROLABLE DESDE ELEMENTOR
   ========================= */

/*
  CAMBIOS CLAVE:
  - Quitado el "justify-content: space-between" fijo (Elementor debe escribirlo).
  - Quitado el centrado con :only-child (si lo dejas, Elementor no tendrá control real).
  - Corregido align-items: left (no existe) -> align-items: center.
  - Se mantiene el fix anti-overflow: min-width:0 + flex:0 1 auto en botones.
*/

.rtb-nav-buttons {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  /* Retoque: un poco menos de aire que 30px */
  margin-top: 26px;

  /* Default neutro (Elementor lo sobrescribe con justify-content) */
  justify-content: flex-start;

  /* alineación vertical correcta */
  align-items: center;
}

/* Desktop: no se estiran */
.rtb-nav-buttons .rtb-btn {
  width: auto;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto; /* NO grow */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  margin: 0 !important;
  line-height: normal;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  /* Retoque: padding consistente */
  padding: 12px 28px;
}

/* Helper Classes */
.hidden {
  display: none;
}

.rtb-sm-check {
  font-size: 0.9em;
  font-weight: normal;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Disclaimer */
.rtb-disclaimer {
  font-size: 0.8em;
  color: #777;
  /* Retoque: más legible y con aire */
  margin-top: 16px;
  line-height: 1.35;
  text-align: center;
}

/* Privacy: que no quede pegado */
.rtb-privacy {
  margin-top: 6px;
}

/* Trip Type Radio Group */
.rtb-trip-type-wrapper {
  display: flex;
  gap: 20px;
  align-items: center;
  /* Retoque: equilibrio de espacio */
  margin-bottom: 22px;
  background: #f1f1f1;
  padding: 12px 12px;
  border-radius: 6px;
  width: fit-content;
  max-width: 100%;
}

.rtb-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0 !important;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background 0.3s;
}

.rtb-radio-label:hover {
  background: rgba(0, 0, 0, 0.05);
}

.rtb-radio-label input[type="radio"] {
  width: auto;
  margin: 0;
}

/* Success View */
.rtb-success-view {
  text-align: center;
  padding: 40px 20px;
}

.rtb-success-card i {
  font-size: 3em;
  color: #28a745;
  margin-bottom: 20px;
}

/* Flatpickr Overrides */
.flatpickr-calendar {
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: none;
}

/* Mobile Breakpoint */
@media (max-width: 767px) {
  .rtb-booking-wrapper {
    padding: 22px 18px;
  }

  .rtb-row {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
  }

  .rtb-col {
    width: 100%;
  }

  .rtb-nav-buttons {
    flex-direction: column-reverse;
    gap: 15px;
  }

  .rtb-nav-buttons .rtb-btn {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}
