/* =============================================================================
   Autocom Site Switcher — ant-toggle.css  v1.3.1
   Comerciales : punto ARRIBA  #CC000C (rojo)
   Particulares: punto ABAJO   #000000 (negro)
   Compatible con desktop, tablet y mobile (Elementor Pro)
   ============================================================================= */

/* --------------------------------------------------------------------------
   CONTENEDOR PRINCIPAL
   -------------------------------------------------------------------------- */
.ant-wrap {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  user-select: none;
  vertical-align: middle;
  /* Asegura visibilidad en todos los breakpoints */
  visibility: visible !important;
  opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   SWITCH VERTICAL — cápsula tall
   -------------------------------------------------------------------------- */
.ant-switch {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 38px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent; /* elimina flash azul en iOS/Android */
}

.ant-switch input {
  display: none;
}

/* Track / óvalo */
.ant-track {
  position: absolute;
  inset: 0;
  background: #ffffff;
  border: 2.5px solid #cccccc;
  border-radius: 999px;
  transition: border-color 0.3s ease;
}

/* Punto (ball) */
.ant-ball {
  position: absolute;
  width: 12px;
  height: 12px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #000000;
  top: calc(100% - 10px - 4px); /* Particulares: abajo */
  transition:
    top 0.35s cubic-bezier(0.34, 1.3, 0.64, 1),
    background 0.3s ease;
}

/* Estado Comerciales → punto ARRIBA, rojo */
.ant-switch input:checked ~ .ant-track {
  border-color: #cc000c;
}
.ant-switch input:checked ~ .ant-track .ant-ball {
  top: 2px;
  background: #cc000c;
}

/* --------------------------------------------------------------------------
   ETIQUETAS
   -------------------------------------------------------------------------- */
.ant-labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ant-lbl {
  display: block;
  font-size: 14px;
  font-weight: 400;
  font-style: normal;
  font-family: "Futura", "Futura PT", "Century Gothic", sans-serif;
  color: #252525;
  text-decoration: none !important;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 0.25s,
    font-weight 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.ant-lbl:hover,
.ant-lbl:focus {
  color: #252525;
  text-decoration: none !important;
  outline: none;
}

/* Comerciales activo → rojo bold */
.ant-lbl.ant-com.active {
  color: #cc000c;
  font-weight: 700;
}

/* Particulares activo → negro bold */
.ant-lbl.ant-par.active {
  color: #000000;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   TABLET  (768px – 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) and (min-width: 768px) {
  .ant-wrap {
    gap: 8px;
  }
  .ant-switch {
    width: 22px;
    height: 38px;
  }
  .ant-ball {
    width: 12px;
    height: 12px;
  }
  /* Recalcular posición abajo para el nuevo tamaño */
  .ant-switch input:not(:checked) ~ .ant-track .ant-ball {
    top: calc(100% - 10px - 4px);
  }
  .ant-switch input:checked ~ .ant-track .ant-ball {
    top: 2px;
  }
  .ant-lbl {
    font-size: 13px;
  }
}

/* --------------------------------------------------------------------------
   MOBILE  (≤ 767px)
   Elementor Pro en mobile muestra el menú hamburguesa. El switcher se
   muestra dentro del menú desplegable cuando se añade el shortcode al
   template de header mobile de Elementor Pro.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .ant-wrap {
    gap: 8px;
    /* En mobile dentro del menú desplegable conviene alinear al centro */
    justify-content: center;
  }
  .ant-switch {
    width: 18px;
    height: 28px;
  }
  .ant-ball {
    width: 10px;
    height: 10px;
  }
  .ant-switch input:not(:checked) ~ .ant-track .ant-ball {
    top: calc(100% - 10px - 4px);
  }
  .ant-switch input:checked ~ .ant-track .ant-ball {
    top: 2px;
  }
  .ant-lbl {
    font-size: 10px;
  }
  .ant-labels {
    gap: 3px;
  }
}

/* --------------------------------------------------------------------------
   DENTRO DEL MENÚ HAMBURGUESA DE ELEMENTOR PRO
   Elementor añade la clase .elementor-nav-menu--dropdown al panel mobile.
   También aplica en el Off-Canvas y el Full-Screen menu.
   -------------------------------------------------------------------------- */
.elementor-nav-menu--dropdown .ant-wrap,
.elementor-location-header .ant-wrap,
.e-n-menu-content .ant-wrap {
  justify-content: flex-start;
  padding: 8px 16px;
}

/* Si el shortcode está dentro de un ítem de menú de Elementor */
.elementor-nav-menu li .ant-wrap {
  padding: 6px 0;
}

/* --------------------------------------------------------------------------
   FORZAR VISIBILIDAD — Elementor a veces oculta widgets en ciertos
   breakpoints con display:none. Esto lo contrarresta.
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .elementor-widget-html .ant-wrap,
  .elementor-widget-shortcode .ant-wrap {
    display: inline-flex !important;
  }
}
