@charset "UTF-8";

/**
 * Formulario de búsqueda SuiteClerk.
 *
 * Un solo formulario, dos formas: apilado en columnas estrechas (tarjeta lateral,
 * ficha de alojamiento) y barra horizontal en contenedores anchos (portada). El
 * cambio depende del ancho del CONTENEDOR, no de la ventana: dentro de una columna
 * de 380px en un monitor de 1920px la barra horizontal no cabe.
 *
 * El ancho lo mide el JS con ResizeObserver y añade la clase .is-wide. No se usan
 * container queries: `container-type: inline-size` implica `contain: inline-size`,
 * el elemento deja de aportar su ancho intrínseco y colapsa dentro de cualquier
 * padre que se ajuste al contenido (contenedores de Elementor, flex con ancho
 * automático, inline-block, celdas de tabla).
 */

.scw-widget {
  --scw-ink: #395b64;
  --scw-accent: #cbad70;
  --scw-accent-ink: #fff;
  --scw-field-bg: #fff;
  --scw-border: rgba(57, 91, 100, 0.22);
  --scw-muted: rgba(57, 91, 100, 0.6);
  --scw-radius: 10px;
  --scw-gap: 10px;
  --scw-field-h: 52px;

  display: block;
  width: 100%;
  box-sizing: border-box;
}

.scw-widget *,
.scw-widget *::before,
.scw-widget *::after {
  box-sizing: border-box;
}

.scw-form {
  display: flex;
  flex-direction: column;
  gap: var(--scw-gap);
  width: 100%;
  margin: 0;
}

/* Campos ------------------------------------------------------------------ */

.scw-form .scw-field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--scw-field-h);
  padding: 0 14px;
  background-color: var(--scw-field-bg);
  border: 1px solid var(--scw-border);
  border-radius: var(--scw-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.scw-form .scw-field:hover {
  border-color: var(--scw-ink);
}

.scw-form .scw-field:focus-within {
  border-color: var(--scw-ink);
  box-shadow: 0 0 0 3px rgba(57, 91, 100, 0.14);
}

.scw-form .scw-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  color: var(--scw-ink);
}

.scw-form .scw-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.scw-form input,
.scw-form select,
.scw-form label {
  cursor: pointer;
  font-family: inherit;
}

.scw-form select {
  flex: 1 1 auto;
  min-width: 0;
  height: calc(var(--scw-field-h) - 2px);
  padding: 0 26px 0 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--scw-ink);
  background: none;
  border: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23395b64' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

.scw-form select:has(option[value=""]:checked) {
  color: var(--scw-muted);
}

/* Fechas: los dos selectores comparten caja, separados por una línea ------- */

.scw-form .scw-dates {
  gap: 0;
  padding: 0;
}

.scw-form .scw-date {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  height: var(--scw-field-h);
  padding: 0 14px;
}

.scw-form .scw-dates .scw-sep {
  flex: 0 0 auto;
  width: 1px;
  height: 24px;
  background-color: var(--scw-border);
}

.scw-form .scw-date-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--scw-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* El input real está oculto: la fecha elegida se pinta en la etiqueta. */
.scw-form .scw-date input.flatpickr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* Una fecha ya elegida deja de ser texto de marcador. */
.scw-form .scw-date.is-filled .scw-date-label {
  color: var(--scw-ink);
}

/* Botón ------------------------------------------------------------------- */

.scw-form .scw-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: var(--scw-field-h);
  padding: 0 18px;
  border-radius: var(--scw-radius);
  background-color: var(--scw-accent);
  cursor: pointer;
  transition: filter 0.15s ease;
}

.scw-form .scw-submit:hover {
  filter: brightness(0.94);
}

.scw-form .scw-submit:focus-within {
  box-shadow: 0 0 0 3px rgba(203, 173, 112, 0.45);
}

.scw-form .scw-submit .scw-icon svg path {
  fill: var(--scw-accent-ink);
  stroke: var(--scw-accent-ink);
}

.scw-form .scw-submit-input {
  border: none;
  background: none;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--scw-accent-ink);
  outline: none;
}

.scw-form .scw-error {
  margin: 0;
  width: 100%;
  font-size: 14px;
  color: #b32d2e;
}

/* Calendario -------------------------------------------------------------- */

.scw-form .flatpickr-calendar {
  z-index: 100;
}

/* Barra horizontal en contenedores anchos --------------------------------- */

/* Barra horizontal en contenedores anchos --------------------------------- */

.scw-widget.is-wide .scw-form {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 20px;
  background-color: var(--scw-ink);
  border-radius: var(--scw-radius);
}

.scw-widget.is-wide .scw-field {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
  border-color: transparent;
}

.scw-widget.is-wide .scw-dates {
  flex: 2 1 0;
}

.scw-widget.is-wide .scw-submit {
  width: auto;
  flex: 0 0 auto;
}

.scw-widget.is-wide .scw-error {
  flex: 1 0 100%;
  color: #ffd9d8;
}
