/*
 * Botón flotante "Solicitar asesoramiento" (Figma 810:22746).
 * Pastilla azul #0075df de 264 x 48, radio 24, sombra 0 4 2 rgba(0,0,0,.25),
 * texto Poppins Medium 16 blanco. Versión colapsada: círculo de 48 px con el icono.
 */
.sticky-btn-wrapper {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sticky-btn-expanded {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px 0 0;
  border-radius: 24px;
  background-color: #0075df;
  color: #fff;
  font-family: Poppins, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: normal;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.sticky-btn-expanded:hover,
.sticky-btn-expanded:focus {
  color: #fff;
  text-decoration: none;
}

.sticky-btn-expanded__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.sticky-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #0075df;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.sticky-btn-icon.hidden,
.sticky-btn-expanded.hidden {
  display: none !important;
}

.sticky-btn-expanded:focus-visible,
.sticky-btn-icon:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Móvil: el mismo botón, anclado abajo a la derecha sin tapar el formulario. */
@media (max-width: 767.98px) {
  .sticky-btn-wrapper {
    right: 16px;
    bottom: 16px;
  }

  .sticky-btn-expanded {
    font-size: 14px;
    padding: 0 12px 0 6px;
  }
}

/* Modal "Solicitar asesoramiento" (Figma 810:7132, 640 px de ancho).
   Sin barra de título: cabecera propia dentro del formulario y X arriba a la derecha. */
.ui-dialog {
  z-index: 1101 !important;
  max-height: calc(100vh - 32px);
  padding: 0 !important;
  border: 0;
  border-radius: 8px;
  background: #fff;
  overflow: auto;
}

.ui-widget-overlay {
  z-index: 1100 !important;
}

.ui-dialog .ui-dialog-titlebar {
  height: 88px;
  padding: 0;
  border: 0;
  background: transparent;
}

.ui-dialog .ui-dialog-title {
  display: none;
}

.ui-dialog .ui-dialog-titlebar-close {
  position: absolute;
  top: 32px;
  right: 26px;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.ui-dialog .ui-dialog-titlebar-close .ui-icon {
  display: none;
}

.ui-dialog .ui-dialog-titlebar-close::before,
.ui-dialog .ui-dialog-titlebar-close::after {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  width: 2px;
  height: 24px;
  background: #3c3c3b;
}

.ui-dialog .ui-dialog-titlebar-close::before {
  transform: rotate(45deg);
}

.ui-dialog .ui-dialog-titlebar-close::after {
  transform: rotate(-45deg);
}

.ui-dialog .ui-dialog-content {
  padding: 0 24px 24px;
  overflow: visible;
}

.asesoramiento-modal {
  margin: 0 !important;
  max-width: none !important;
}

.asesoramiento-modal .js-form-type-processed-text h2 {
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 29px;
  color: #0075df;
  text-align: center;
  margin: 0;
}

.asesoramiento-modal .js-form-type-processed-text p {
  font-family: Inter, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #3c3c3b;
  text-align: center;
  margin: 16px 0 32px;
}

/* Icono de auriculares (PNG de Figma, 48 x 48). */
.sticky-btn-expanded__icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  margin: 0 -4px 0 -4px;
}

.sticky-btn-icon img {
  width: 40px;
  height: 40px;
}

/* Móvil: el modal ocupa casi toda la pantalla. */
@media (max-width: 767.98px) {
  .ui-dialog {
    max-width: calc(100vw - 16px);
  }
}

.ui-dialog .asesoramiento-modal label .asesoramiento-required,
.ui-dialog .asesoramiento-modal .form-check-label .form-required {
  color: #DE0A0A;
}

/* X de cierre del modal en azul (#0075DF). */
.ui-dialog .ui-dialog-titlebar-close::before,
.ui-dialog .ui-dialog-titlebar-close::after {
  background: #0075DF !important;
}

/* Botón Enviar con la clase button-background-blue: el tema de diálogos (.ui-dialog .button)
   le pone un degradado gris; se quita para que se vean los atributos de la clase. */
.ui-dialog .asesoramiento-modal .button-background-blue {
  background-image: none;
}

/* Asterisco del checkbox de protección de datos en rojo #DE0A0A. */
.ui-dialog .asesoramiento-modal .asesoramiento-required {
  color: #DE0A0A;
}

/* Checkboxes y radios marcados en azul, como en contacto y presupuesto.
   La configuración del webform te_ayudamos (CSS heredado de Roques) los pinta en verde
   con !important; esta regla tiene más especificidad y se aplica encima. */
.ui-dialog .asesoramiento-modal input[type="checkbox"]:checked {
  background-color: #0075df !important;
  border-color: #0075df !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3e%3cpath fill='%23fff' d='M31.2199 12.1597C31.0649 12.0035 30.8806 11.8795 30.6775 11.7948C30.4744 11.7102 30.2566 11.6667 30.0365 11.6667C29.8165 11.6667 29.5987 11.7102 29.3956 11.7948C29.1925 11.8795 29.0081 12.0035 28.8532 12.1597L16.4365 24.593L11.2199 19.3597C11.059 19.2043 10.8691 19.0821 10.661 19.0001C10.4529 18.9181 10.2307 18.8778 10.0071 18.8817C9.78344 18.8856 9.56276 18.9335 9.35763 19.0226C9.1525 19.1118 8.96693 19.2405 8.81154 19.4013C8.65614 19.5622 8.53395 19.7521 8.45194 19.9602C8.36994 20.1683 8.32972 20.3905 8.33359 20.6141C8.33746 20.8378 8.38534 21.0584 8.47449 21.2636C8.56365 21.4687 8.69233 21.6543 8.8532 21.8097L15.2532 28.2097C15.4081 28.3659 15.5925 28.4899 15.7956 28.5745C15.9987 28.6591 16.2165 28.7027 16.4365 28.7027C16.6566 28.7027 16.8744 28.6591 17.0775 28.5745C17.2806 28.4899 17.4649 28.3659 17.6199 28.2097L31.2199 14.6097C31.389 14.4536 31.5241 14.2642 31.6164 14.0533C31.7087 13.8425 31.7564 13.6148 31.7564 13.3847C31.7564 13.1545 31.7087 12.9268 31.6164 12.716C31.5241 12.5052 31.389 12.3157 31.2199 12.1597Z'/%3e%3c/svg%3e") !important;
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.ui-dialog .asesoramiento-modal input[type="radio"]:checked {
  background-color: #fff !important;
  border-color: #0075df !important;
  background-image: radial-gradient(circle, #0075df 0 12px, transparent 12.5px) !important;
}

/* Móvil: el contenido del modal (#drupal-modal) sin padding lateral. */
@media (max-width: 767.98px) {
  #drupal-modal.ui-dialog-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
