/* Ayuda compartida: botón del encabezado y modal de video. */
.ayuda-boton {
  order: 2;
  min-width: 92px;
  min-height: 40px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 6px;
  background: rgba(0, 56, 63, 0.28);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.ayuda-boton:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 81, 94, 0.78);
}

.ayuda-boton:focus-visible,
.ayuda-modal :focus-visible {
  outline: 3px solid rgba(221, 184, 146, 0.92);
  outline-offset: 2px;
}

.ayuda-boton__icono {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 0.78rem;
  line-height: 1;
}

.solicitud-page .ayuda-boton {
  margin-left: auto;
}

.solicitud-page .menu-toggle {
  order: 3;
  margin-left: 8px;
}

.seguimiento-page .ayuda-boton {
  order: initial;
  margin-left: 0;
}

.seguimiento-page .menu-toggle {
  order: initial;
}

.contrasena-header {
  position: relative;
}

.contrasena-header .ayuda-boton {
  position: absolute;
  right: 30px;
}

.ayuda-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2100;
  padding: 20px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(2, 45, 49, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.ayuda-modal-backdrop[hidden] {
  display: none !important;
}

.ayuda-modal {
  width: min(760px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  color: #292929;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 38, 43, 0.35);
}

.ayuda-modal__cabecera {
  position: relative;
  padding: 21px 68px 20px 24px;
  color: #ffffff;
  background: linear-gradient(120deg, #00515e, #00383f);
}

.ayuda-modal__cabecera h2 {
  margin: 0;
  font: 500 clamp(1.55rem, 4vw, 2rem) / 1.15 Georgia,
    "Times New Roman", serif;
}

.ayuda-modal__cerrar-icono {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.ayuda-modal__cerrar-icono:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ayuda-modal__contenido {
  padding: clamp(20px, 4vw, 30px);
}

.ayuda-modal__subtitulo {
  margin: 0 0 15px;
  color: #00383f;
  font-size: 1rem;
  font-weight: 700;
}

.ayuda-modal__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 81, 94, 0.2);
  border-radius: 8px;
  background: #eef4f3;
}

.ayuda-modal__video iframe,
.ayuda-modal__video video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000000;
}

.ayuda-modal__pendiente {
  margin: 0;
  padding: 20px;
  color: #526064;
  text-align: center;
  line-height: 1.55;
}

.ayuda-modal__acciones {
  padding: 0 clamp(20px, 4vw, 30px) clamp(20px, 4vw, 26px);
  display: flex;
  justify-content: flex-end;
}

.ayuda-modal__cerrar {
  min-width: 112px;
  min-height: 44px;
  padding: 10px 22px;
  color: #ffffff;
  border: 1px solid #00515e;
  border-radius: 6px;
  background: #00515e;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ayuda-modal__cerrar:hover {
  border-color: #00383f;
  background: #00383f;
}

.ayuda-modal-abierto {
  overflow: hidden !important;
}

@media (max-width: 620px) {
  .ayuda-boton {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 7px;
  }

  .ayuda-boton__texto {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .solicitud-page .menu-toggle,
  .seguimiento-page .menu-toggle {
    margin-left: 6px;
  }

  .contrasena-header .ayuda-boton {
    right: 12px;
  }

  .ayuda-modal-backdrop {
    padding: 12px;
  }

  .ayuda-modal {
    max-height: calc(100dvh - 24px);
  }

  .ayuda-modal__cabecera {
    padding: 18px 62px 17px 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ayuda-boton {
    transition: none;
  }
}
