/* ═══════════════════════════════════════════════════════════════
   TeamHost/Inmovilla — FAlertas Form
   Habitat Catalunya Theme
   Scope: .teamhost-shortcode.teamhost-alertas
   HTML generado remotamente por imediasystems.es
   ═══════════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   1. OVERRIDE VARIABLES DEL PLUGIN
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas {
  --color-web-principal: #24559D;
  --color-texto-principal: #ffffff;
  --button_border: 9999px;
}


/* ══════════════════════════════════════════════════════════════
   2. CONTAINER (strip Bootstrap card look)
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas {
  background-color: #ffffff !important;
}

.teamhost-shortcode.teamhost-alertas .search-alertas,
.teamhost-shortcode.teamhost-alertas .search,
.teamhost-shortcode.teamhost-alertas .search-wrapper2,
.teamhost-shortcode.teamhost-alertas .search2 {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.teamhost-shortcode.teamhost-alertas form > br {
  display: none !important;
}


/* ══════════════════════════════════════════════════════════════
   3. TÍTULOS DE SECCIÓN
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas h2,
.teamhost-shortcode.teamhost-alertas h3,
.teamhost-shortcode.teamhost-alertas h4 {
  font-family: var(--hc-font) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--hc-text) !important;
  margin-top: 56px !important;
  margin-bottom: 28px !important;
  margin-left: 8px !important;
  letter-spacing: -0.01em !important;
}

.teamhost-shortcode.teamhost-alertas h2:first-child,
.teamhost-shortcode.teamhost-alertas h3:first-child,
.teamhost-shortcode.teamhost-alertas h4:first-child {
  margin-top: 0 !important;
}

.teamhost-shortcode.teamhost-alertas h2:nth-of-type(2) {
  margin-top: 24px !important;
  margin-left: 8px !important;
}


/* ══════════════════════════════════════════════════════════════
   4. LABELS (creados por JS, insertados antes de cada campo)
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas label {
  display: block !important;
  font-family: var(--hc-font) !important;
  font-size: clamp(16px, 4vw, 20px) !important;
  font-weight: 500 !important;
  color: #000000 !important;
  line-height: 1.5 !important;
  letter-spacing: 0px !important;
  margin-bottom: 12px !important;
  position: static !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  padding: 0 !important;
  background: none !important;
  float: none !important;
}

/* Dropdown container del multiselect */
.teamhost-shortcode.teamhost-alertas .multiselect-container {
  background-color: #ffffff !important;
  border: 2px solid #E5E5E5 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  max-height: 320px !important;
  overflow-y: auto !important;
  padding: 8px 0 !important;
  margin: 12px 0 0 0 !important;
  list-style: none !important;
}

/* Ocultar la primera opción (placeholder duplicado) */
.teamhost-shortcode.teamhost-alertas .multiselect-container > li:first-child {
  display: none !important;
}

/* Items del dropdown */
.teamhost-shortcode.teamhost-alertas .multiselect-container li {
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid #F0F0F0 !important;
}

.teamhost-shortcode.teamhost-alertas .multiselect-container li:last-child {
  border-bottom: none !important;
}

/* Items del dropdown (li) */
.teamhost-shortcode.teamhost-alertas .multiselect-container li {
  transition: background-color 0.15s ease !important;
}

.teamhost-shortcode.teamhost-alertas .multiselect-container li:hover {
  background-color: rgba(0, 0, 0, 0.06) !important;
}

/* Labels dentro del dropdown */
.teamhost-shortcode.teamhost-alertas .multiselect-container label {
  display: flex !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  margin-bottom: 0 !important;
  padding: 12px 16px !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--hc-text) !important;
  cursor: pointer !important;
  background-color: transparent !important;
  transition: none !important;
}

.teamhost-shortcode.teamhost-alertas .multiselect-container li:hover label {
  background-color: transparent !important;
}

/* Checkboxes dentro del dropdown */
.teamhost-shortcode.teamhost-alertas .multiselect-container input[type="checkbox"] {
  accent-color: #24559D !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
}


/* ══════════════════════════════════════════════════════════════
   5. INPUTS (text, email, tel, number)
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas .form-control,
.teamhost-shortcode.teamhost-alertas .form-ref,
.teamhost-shortcode.teamhost-alertas .form-precio,
.teamhost-shortcode.teamhost-alertas select.form-control,
.teamhost-shortcode.teamhost-alertas input[type="text"],
.teamhost-shortcode.teamhost-alertas input[type="email"],
.teamhost-shortcode.teamhost-alertas input[type="tel"],
.teamhost-shortcode.teamhost-alertas input[type="number"] {
  width: 100% !important;
  height: 50px !important;
  padding: 12px 16px !important;
  border: 2px solid #E5E5E5 !important;
  border-radius: 8px !important;
  background-color: #ffffff !important;
  font-family: var(--hc-font) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: var(--hc-text) !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Placeholders */
.teamhost-shortcode.teamhost-alertas .form-control::placeholder,
.teamhost-shortcode.teamhost-alertas .form-ref::placeholder,
.teamhost-shortcode.teamhost-alertas .form-precio::placeholder,
.teamhost-shortcode.teamhost-alertas input[type="text"]::placeholder,
.teamhost-shortcode.teamhost-alertas input[type="email"]::placeholder,
.teamhost-shortcode.teamhost-alertas input[type="tel"]::placeholder,
.teamhost-shortcode.teamhost-alertas input[type="number"]::placeholder {
  color: #BFBFBF !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

/* Focus */
.teamhost-shortcode.teamhost-alertas .form-control:focus,
.teamhost-shortcode.teamhost-alertas .form-ref:focus,
.teamhost-shortcode.teamhost-alertas .form-precio:focus,
.teamhost-shortcode.teamhost-alertas input[type="text"]:focus,
.teamhost-shortcode.teamhost-alertas input[type="email"]:focus,
.teamhost-shortcode.teamhost-alertas input[type="tel"]:focus,
.teamhost-shortcode.teamhost-alertas input[type="number"]:focus {
  border-color: #1B66CC !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(27, 102, 204, 0.1) !important;
}


/* ══════════════════════════════════════════════════════════════
   5b. BUTTON MULTISELECT
   El plugin usa <button class="multiselect dropdown-toggle btn form-control">
   en lugar de <select> visible
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas button.multiselect.form-control {
  text-align: left !important;
  display: flex !important;
  align-items: center !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}

.teamhost-shortcode.teamhost-alertas button.multiselect .caret,
.teamhost-shortcode.teamhost-alertas button.multiselect::after {
  display: none !important;
}

.teamhost-shortcode.teamhost-alertas .multiselect-selected-text {
  font-family: var(--hc-font) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  flex: 1 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}


/* ══════════════════════════════════════════════════════════════
   6. SELECT NATIVO (arrow custom)
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 40px !important;
  cursor: pointer !important;
}


/* ══════════════════════════════════════════════════════════════
   7. TEXTAREA
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas textarea.form-control,
.teamhost-shortcode.teamhost-alertas textarea {
  height: auto !important;
  min-height: 140px !important;
  resize: none !important;
  padding: 12px 16px !important;
  line-height: 1.6 !important;
}


/* ══════════════════════════════════════════════════════════════
   8. ESPACIADO ENTRE CAMPOS
   Los contenedores reales son .col-md-X (no .form-group)
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas .col-md-6,
.teamhost-shortcode.teamhost-alertas .col-md-3 {
  margin-bottom: 16px !important;
}

/* El col-md-6 que contiene .boton1 (btn Enviar Alerta) debe ocupar 100% */
.teamhost-shortcode.teamhost-alertas .col-md-6:has(.boton1) {
  width: 100% !important;
  float: none !important;
}

.teamhost-shortcode.teamhost-alertas .row {
  margin-left: -8px !important;
  margin-right: -8px !important;
}

.teamhost-shortcode.teamhost-alertas .row [class*="col-"] {
  padding-left: 8px !important;
  padding-right: 8px !important;
}


/* ══════════════════════════════════════════════════════════════
   9. CHECKBOX PRIVACIDAD
   Estructura real: .content-condiciones > .col-md-12 > input[checkbox] + a
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas .content-condiciones > div {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}

.teamhost-shortcode.teamhost-alertas .content-condiciones a {
  font-family: var(--hc-font) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #24559D !important;
  text-decoration: underline !important;
  line-height: 1.5 !important;
}

/* Mantener .checkbox para compatibilidad */
.teamhost-shortcode.teamhost-alertas .checkbox,
.teamhost-shortcode.teamhost-alertas .checkbox label {
  font-family: var(--hc-font) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--hc-text-light) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  line-height: 1.5 !important;
}

.teamhost-shortcode.teamhost-alertas input[type="checkbox"] {
  accent-color: #24559D !important;
  width: 16px !important;
  height: 16px !important;
  flex-shrink: 0 !important;
  margin-top: 2px !important;
}

.teamhost-shortcode.teamhost-alertas .checkbox a {
  color: #24559D !important;
  text-decoration: underline !important;
}


/* ══════════════════════════════════════════════════════════════
   10. BOTÓN SUBMIT
   ══════════════════════════════════════════════════════════════ */
.teamhost-shortcode.teamhost-alertas .boton1 {
  display: block !important;
  width: 100% !important;
}

.teamhost-shortcode.teamhost-alertas .submit-search-alertas,
.teamhost-shortcode.teamhost-alertas button[type="submit"],
.teamhost-shortcode.teamhost-alertas input[type="submit"] {
  width: 100% !important;
  height: 54px !important;
  padding: 12px 24px !important;
  background-color: #24559D !important;
  color: #ffffff !important;
  font-family: var(--hc-font) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  transition: background-color 0.2s ease !important;
  margin-top: 24px !important;
  display: block !important;
  line-height: 1 !important;
}

.teamhost-shortcode.teamhost-alertas .submit-search-alertas:hover,
.teamhost-shortcode.teamhost-alertas button[type="submit"]:hover,
.teamhost-shortcode.teamhost-alertas input[type="submit"]:hover {
  background-color: #1B66CC !important;
  opacity: 1 !important;
  color: #ffffff !important;
}


/* ══════════════════════════════════════════════════════════════
   11. RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .teamhost-shortcode.teamhost-alertas .col-sm-6,
  .teamhost-shortcode.teamhost-alertas .col-sm-4,
  .teamhost-shortcode.teamhost-alertas .col-sm-3,
  .teamhost-shortcode.teamhost-alertas .col-md-6,
  .teamhost-shortcode.teamhost-alertas .col-md-4,
  .teamhost-shortcode.teamhost-alertas .col-md-3,
  .teamhost-shortcode.teamhost-alertas .col-xs-6,
  .teamhost-shortcode.teamhost-alertas .listado-zona,
  .teamhost-shortcode.teamhost-alertas .listado-type {
    width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 16px !important;
  }

  .teamhost-shortcode.teamhost-alertas .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
