/*
 * Selectores con prefijo #modalCambioPassword: este modal se reutiliza tanto en
 * home.php como en el login (src/index.php), que ya trae modales de Bootstrap
 * (clases .modal / .btn). El prefijo evita que estos estilos se filtren a esos
 * otros componentes.
 */

#modalCambioPassword,
#modalCambioPassword * {
  box-sizing: border-box;
}

/* SweetAlert2 (Swal.fire) usa un z-index menor al de este modal por defecto;
   sin esto, las alertas de validacion quedan tapadas detras del modal. */
.swal2-container {
  z-index: 20000 !important;
}

#modalCambioPassword.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 92vw;
  height: auto;
  max-height: 100vh;
  background: #ffffff;
  border: 1px solid #b9b9b9;
  border-radius: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  overflow-y: auto;
  z-index: 1100;
}

#modalCambioPassword .modal__header {
  background: linear-gradient(to bottom, #3ea0e8, #1f7fce);
  color: #ffffff;
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #d6d6d6;
}

#modalCambioPassword .modal__body {
  padding: 14px 18px;
}

#modalCambioPassword .modal__message {
  text-align: center;
  font-size: 12px;
  color: #333333;
  margin: 0 0 10px;
  line-height: 1.3;
}

#modalCambioPassword .field {
  margin-bottom: 10px;
}

#modalCambioPassword .field label {
  display: block;
  font-weight: bold;
  font-size: 12px;
  color: #222222;
  margin-bottom: 3px;
}

#modalCambioPassword .field input {
  width: 100%;
  padding: 4px 5px;
  font-size: 13px;
  border: 1px solid #c9c9c9;
  border-radius: 10px;
  outline: none;
  color: #333333;
}

#modalCambioPassword .field input:focus {
  border-color: #1f7fce;
  box-shadow: 0 0 0 2px rgba(31, 127, 206, 0.2);
}

#modalCambioPassword .field input[disabled] {
  background: #c9c9c9;
  color: #6f6f6f;
  font-weight: bold;
}

#modalCambioPassword .password-wrapper {
  position: relative;
}

#modalCambioPassword .password-wrapper input {
  padding-right: 28px;
}

#modalCambioPassword .toggle-password {
  position: absolute;
  top: 50%;
  right: 9px;
  transform: translateY(-50%);
  color: #8a8a8a;
  cursor: pointer;
  font-size: 13px;
}

#modalCambioPassword .toggle-password:hover {
  color: #1f7fce;
}

#modalCambioPassword .modal__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 4px;
}

#modalCambioPassword .btn {
  min-width: 100px;
  padding: 5px 15px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  cursor: pointer;
}

#modalCambioPassword .btn-accept {
  background: #1f7fce;
}

#modalCambioPassword .btn-accept:hover {
  background: #1a6fb3;
}

#modalCambioPassword .btn-cancel {
  background: #e8452c;
}

#modalCambioPassword .btn-cancel:hover {
  background: #cf3b24;
}
