/*
======================================
    CONTACT FORM CSS
=======================================
*/

.user_access_button{
    color: var(--color-button-txt);
    background-color: var(--color-button-bkg);
    width: fit-content;
    margin: 0 auto;
    border-radius: 40px;
    min-width: 120px;
    height: 48px;
    font-size: 0.95rem;
    padding: 10px 24px;
    border: none;
    cursor: pointer;
  }

.login_icon{
    width: 150px;
    margin-bottom: 10px;
  }

.error_text{
  font-size: 0.975rem;
}

.ua_align_left{
  text-align: left;
  align-items: left;
}


.user_access_wrapper{
  width: 100%;
  /* height: 100vh; */
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
}

.user_access_box,.user_register_box{
  width: 20vw;
  min-width: 280px;
  max-width: 88vw;
  padding: 30px 24px;
  font-size: 0.95rem;
  border-radius: 12px;
}

.user_access_input_fields {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline-block;
    border: 2px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
  }

@media (max-width: 1100px) {
  .user_access_box,.user_register_box{
    width: 88vw;
    font-size: 0.95rem;
    padding: 24px 20px;
    border-radius: 12px;
  }
}

.user_access_box,.user_register_box{
  height: fit-content;
  -webkit-box-shadow: 8px 8px 22px 4px rgb(0 0 0 / 11%);
  box-shadow: 8px 8px 22px 4px rgb(0 0 0 / 11%);
  text-align: center;
  align-items: center;
  margin: 0 auto;
  position: relative;
  margin-top: 50px;
  
}

/* ═══════════════════════════════════════════════════════════════════════════
   Login portal (login.php) — SSO Google + DNIe
   Nota: estas reglas vivían en platform_style.css, que NO se enlaza en
   general_imports.php (solo se carga multiplatform + contact + …), por eso
   el botón DNIe aparecía como enlace dorado sin caja. SPEC-016 / login_cert.
   ═══════════════════════════════════════════════════════════════════════════ */

.login_google_row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  padding-bottom: 4px;
  margin-bottom: 4px;
  text-align: center;
}

.login_google_row .g_id_signin {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}

.login_google_error_text {
  font-size: 0.82rem;
  min-height: 0;
  margin: 0;
  line-height: 1.2;
}

.login_cert_row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  margin-bottom: 4px;
}

/*
 * Ancho como GIS (300px). padding-left ~ igual al hueco del botón Google personalizado
 * (margen + avatar/icono + separación) para alinear “DNIe / …” con “Inicia sesión como …”.
 * Ajustar --login-cert-align-pad si cambia el tema o idioma del widget.
 */
#portal_login_app a.login_cert_button,
#portal_login_app a.login_cert_button:link,
#portal_login_app a.login_cert_button:visited {
  --login-cert-align-pad: 48px;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 10px 0 var(--login-cert-align-pad) !important;
  gap: 8px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 22px !important;
  background-color: #fff !important;
  text-decoration: none !important;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif !important;
  /* Entre el −20% (11.2px) y los 14px del widget Google */
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: normal !important;
  letter-spacing: 0 !important;
  color: #6e7378 !important;
  white-space: nowrap !important;
  -webkit-font-smoothing: antialiased !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

#portal_login_app a.login_cert_button:hover,
#portal_login_app a.login_cert_button:focus {
  color: #5f6368 !important;
  background-color: #f8f9fa !important;
  border-color: #dadce0 !important;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12), 0 1px 3px rgba(60, 64, 67, 0.08) !important;
}

#portal_login_app a.login_cert_button:focus-visible {
  outline: 2px solid #1a73e8 !important;
  outline-offset: 2px !important;
}

#portal_login_app a.login_cert_button span {
  color: inherit !important;
  text-align: left !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Logo DNIe pegado al borde derecho del botón (misma lógica visual que el icono de Google) */
.login_cert_button_icon {
  width: 40px !important;
  height: 40px !important;
  object-fit: contain !important;
  border-radius: 3px !important;
  flex-shrink: 0 !important;
  margin-inline-end: 2px !important;
}

#portal_login_app .login_separator,
#portal_login_app .login_separator span {
  color: #9e9c98 !important;
}

.login_separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  color: #9e9c98;
  font-size: 0.85rem;
}

.login_separator::before,
.login_separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0ddd8;
}

.login_separator::before { margin-right: 10px; }
.login_separator::after  { margin-left: 10px; }

/* login_cert.php (pantalla DNIe) */
.login_cert_box .login_cert_heading_row {
  text-align: center;
}

.login_cert_heading {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
}

.login_cert_logos_row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0 8px;
}

.login_cert_logo {
  max-height: 56px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.login_cert_intro_row {
  text-align: center;
}

.login_cert_intro,
.login_cert_note {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #444;
}

.login_cert_note {
  font-size: 0.82rem;
  color: #666;
}

.login_cert_placeholder {
  width: 100%;
  padding: 14px 16px;
  border: 1px dashed #c5c3bf;
  border-radius: 8px;
  background: #faf9f7;
  color: #555;
  font-size: 0.88rem;
  text-align: center;
  line-height: 1.45;
}

.login_cert_actions {
  margin-top: 8px;
  text-align: center;
}

.login_cert_primary_btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login_cert_back_wrap {
  margin-top: 1rem;
}

.login_cert_stepup_banner {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  margin: 10px 0 4px;
  border-radius: 8px;
  background: #e8f0fe;
  border: 1px solid #c6dafc;
  color: #174ea6;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
}

.login_cert_error_banner {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  margin: 10px 0 4px;
  border-radius: 8px;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #b71c1c;
  font-size: 0.88rem;
  line-height: 1.4;
  text-align: center;
}

.login_cert_two_actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 16px 0 8px;
}

.login_cert_method_btn {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #dadce0;
  background: #fff;
  color: #1f1f1f;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.login_cert_method_btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.login_cert_method_btn_secondary {
  font-weight: 500;
  color: #5f6368;
}

.login_cert_mvp_disclaimer {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #888;
  text-align: center;
}

/* <dialog> MVP */
.login_cert_dialog {
  max-width: min(92vw, 420px);
  padding: 0;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.login_cert_dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.login_cert_dialog_inner {
  padding: 20px 22px 18px;
}

.login_cert_dialog_title {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
}

.login_cert_dialog_body {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #444;
}

.login_cert_dialog_actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.login_cert_dialog_primary {
  width: 100%;
  margin: 0 !important;
}

.login_cert_dialog_close {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #dadce0;
  background: #fff;
  color: #5f6368;
  font-size: 0.88rem;
  cursor: pointer;
}

.login_cert_dialog_close:hover {
  background: #f8f9fa;
}

/* Botón "Usar el DNIe" — acción real (pendiente de integración en fases posteriores) */
.login_cert_dialog_dnie_real {
  width: 100%;
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid #004A90;
  background: #fff;
  color: #004A90;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.login_cert_dialog_dnie_real:hover {
  background: #e8f0fe;
  box-shadow: 0 1px 2px rgba(0, 74, 144, 0.12);
}

/* ── AutoFirma status ───────────────────────────────────────────── */
.login_cert_af_trigger:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.login_cert_af_status {
  font-size: 0.82rem;
  min-height: 1.2em;
  margin: 6px 0 0;
  text-align: center;
  color: #555;
}
.login_cert_af_status--error {
  color: #b71c1c;
}

/* ── P12 / PFX upload form ──────────────────────────────────────── */
.login_cert_p12_field {
  margin-bottom: 14px;
}
.login_cert_p12_label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.login_cert_p12_dropzone {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px dashed #a0aec0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}
.login_cert_p12_dropzone:hover,
.login_cert_p12_dropzone:focus {
  border-color: #004A90;
  background: #eef4ff;
  outline: none;
}
.login_cert_p12_dropzone.login_cert_p12_dropzone--has-file {
  border-style: solid;
  border-color: #004A90;
  background: #eef4ff;
}
.login_cert_p12_placeholder {
  font-size: 0.82rem;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.login_cert_p12_dropzone.login_cert_p12_dropzone--has-file .login_cert_p12_placeholder {
  color: #004A90;
  font-weight: 500;
}
.login_cert_p12_file_input {
  display: none;
}
.login_cert_p12_password {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #1a1a2e;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.login_cert_p12_password:focus {
  outline: none;
  border-color: #004A90;
  box-shadow: 0 0 0 3px rgba(0, 74, 144, 0.12);
}
.login_cert_p12_error {
  font-size: 0.82rem;
  color: #b71c1c;
  min-height: 1.2em;
  margin: 4px 0 8px;
  text-align: center;
}