/**
 * Correcciones críticas de CSS para los campos de nombre y formularios
 * Estas reglas tienen mayor especificidad para sobreescribir cualquier otra regla
 */

/* Correcciones específicas para el botón de Google y elementos posteriores */
.drunel-google-container {
    height: auto !important;
    max-height: 50px !important;
    overflow: visible !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

.drunel-google-wrapper {
    height: auto !important;
    max-height: 50px !important;
    overflow: visible !important;
}

/* === NEUTRALIZACIÓN DIRECTA DE LA REGLA haAclf === */
.haAclf,
div.haAclf,
.g_id_signin .haAclf,
.drunel-google-container .haAclf,
.drunel-google-wrapper .haAclf,
[class*='haAclf'],
div[class*='haAclf'],
span[class*='haAclf'],
*[class*='haAclf'] {
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Hack de alto contraste para forzar display:block y ancho completo */
@media all {
    .haAclf {
        display: block !important;
        width: 100% !important;
        float: none !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Forzar que el enlace de recuperación se muestre correctamente */
.drunel-reset-link {
    position: relative !important;
    z-index: 10 !important;
    margin-top: 10px !important;
    clear: both !important;
}

/* Forzar que el contenedor del formulario se ajuste al contenido */
.drunel-form {
    height: auto !important;
    overflow: visible !important;
}

/* Forzar que los campos de nombre no afecten el layout cuando están ocultos */
.drunel-name-fields:not(:visible) {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* Corregir iframes de Google */
iframe[src*="accounts.google.com"] {
    display: block !important;
    height: 44px !important;
    max-height: 44px !important;
    overflow: hidden !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* Correcciones adicionales para forzar centrado del botón de Google - con mayor especificidad */
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin div,
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin span,
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin iframe,
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin a {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    margin: 0 auto !important;
}

/* Corrección específica para elementos internos del botón de Google */
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin div[style*="display:"],
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin div[style*="display:"] > div {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
}

/* Corrección para elementos centrados - con mayor especificidad */
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin div[role="button"],
html body .drunel-auth-wrapper .drunel-form .drunel-google-container .g_id_signin .nsm7Bb-HzV7m-LgbsSe {
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 280px !important;
}

/* === SOLUCIÓN RADICAL - RESET COMPLETO DE ESTILOS PARA EL BOTÓN DE GOOGLE === */
.drunel-auth-wrapper .drunel-google-container * {
    box-sizing: border-box !important;
}

.drunel-auth-wrapper .drunel-google-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 15px auto !important;
    position: relative !important;
}

/* Solución directa para .haAclf y cualquier contenedor que pueda estar afectando */
.drunel-auth-wrapper .drunel-google-container .haAclf,
.drunel-auth-wrapper .drunel-google-container [class*="haAclf"],
.drunel-auth-wrapper .drunel-google-container div[class*="haAclf"],
.drunel-auth-wrapper .g_id_signin .haAclf,
.haAclf {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
