/**
 * Estilos para Drunel Login Plugin
 * 
 * @package DrunelLogin
 * @version 1.0.0
 */

/* ===== CONTENEDOR PRINCIPAL ===== */
.drunel-auth-wrapper {
    max-width: 400px;
    margin: 2rem auto;
    padding: 1.5rem; /* Padding del contenedor principal que afecta todo */
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow: hidden; /* Evita que el contenido se desborde */
}

/* ===== PESTAÑAS ===== */
.drunel-tabs {
    display: flex;
    margin: 0; /* Sin margen negativo para evitar que se salgan del contenedor */
    border-bottom: 2px solid #eee;
    background: #f9f9f9;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    width: 100%; /* Usar todo el ancho disponible sin exceder */
    box-sizing: border-box;
}

.drunel-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    cursor: pointer;
    background-color: #f3f3f3;
    color: #333;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    height: 48px; /* Altura fija para ambas pestañas */
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.drunel-tab:hover {
    background-color: #e9e9e9;
    color: #000;
}

.drunel-tab.active {
    background-color: #fff;
    color: #000;
    border-bottom: 3px solid #007cba;
    font-weight: 600;
}

.drunel-tab:first-child {
    border-radius: 0; /* Sin border-radius para que coincida con el ancho del formulario */
}

.drunel-tab:last-child {
    border-radius: 0; /* Sin border-radius para que coincida con el ancho del formulario */
}

/* Anular márgenes en las pestañas para evitar diferencias de altura */
.drunel-tab {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Asegurar que ambas pestañas tengan exactamente las mismas propiedades */
.drunel-tabs .drunel-tab {
    margin: 0 !important;
    padding: 0.75rem 1rem !important;
    height: 48px !important;
    box-sizing: border-box !important;
}

/* ===== FORMULARIOS ===== */
.drunel-form {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
    padding: 0; /* Sin padding, usa el del contenedor principal */
    width: 100%; /* Asegurar que ocupe todo el ancho disponible */
    box-sizing: border-box;
}

.drunel-form.active,
.drunel-form.drunel-visible {
    display: block !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.drunel-form form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%; /* Usar todo el ancho disponible */
    max-width: none; /* Eliminar limitación de ancho */
    margin: 0;
    /* gap: 8px; - Eliminado para mejor control del espaciado */
}

/* Espacio específico antes del primer input del formulario */
.drunel-form form > input:first-child,
.drunel-form form > .drunel-password-wrapper:first-child,
.drunel-form form > div:first-child,
.drunel-form form > .drunel-hide-on-token:first-child,
.drunel-form .drunel-token-container:first-child,
.drunel-form #drunel-token-wrapper {
    margin-top: 15px;
}

/* ===== INPUTS ===== */
.drunel-form input[type="text"],
.drunel-form input[type="email"],
.drunel-form input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background-color: #fff;
    /* Asegurar altura consistente para todos los inputs */
    height: 48px;
    line-height: 1.5;
    margin-bottom: 6px; /* Espaciado específico entre inputs */
}

/* Input wrapper para password con ojo */
.drunel-password-wrapper {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    /* Asegurar que el wrapper no agregue altura extra */
    margin: 0;
    margin-bottom: 6px; /* Espaciado específico para wrappers de contraseña */
    padding: 0;
    line-height: 1.5;
}

.drunel-password-wrapper input[type="password"],
.drunel-password-wrapper input[type="text"] {
    padding-right: 45px; /* Espacio para el ícono del ojo */
    width: 100%;
    margin-bottom: 0; /* Sin margen individual ya que el wrapper lo maneja */
}

.drunel-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: color 0.3s ease;
    user-select: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 3px;
    line-height: 1;
    pointer-events: auto;
    /* Asegurar centrado perfecto */
    box-sizing: border-box;
    vertical-align: middle;
}

.drunel-password-toggle:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.drunel-password-toggle:active {
    color: #000;
    background: rgba(0, 0, 0, 0.1);
}

/* Íconos para mostrar/ocultar contraseña - estilo minimalista tradicional */
.drunel-password-toggle::before {
    content: "";
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px 16px;
}

/* Mejorar compatibilidad del ícono tachado */
.drunel-password-toggle.hidden::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.drunel-password-toggle.hidden::after {
    display: none;
}

/* Versión alternativa para dispositivos que no soporten bien el text-decoration */
@media screen and (max-width: 768px) {
    .drunel-password-toggle {
        font-size: 16px;
        width: 22px;
        height: 22px;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        line-height: 1;
    }
    
    .drunel-password-toggle::before {
        font-size: 14px;
        line-height: 1;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background-size: 14px 14px;
    }
    
    .drunel-password-toggle.hidden::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
    }
}

/* Fallback para navegadores sin soporte de SVG */
.drunel-password-toggle.fallback::before {
    content: "○";
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    background-image: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.drunel-password-toggle.fallback.hidden::before {
    content: "◉";
    background-image: none !important;
}

.drunel-password-toggle.fallback.hidden::after {
    display: none;
}

/* Estilo unicode alternativo para mejor compatibilidad */
.drunel-password-toggle.unicode::before {
    content: "👁";
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", monospace, Arial, sans-serif;
    background-image: none !important;
}

.drunel-password-toggle.unicode.hidden::before {
    content: "🙈";
    background-image: none !important;
}

/* Mejorar accesibilidad y foco */
.drunel-password-toggle:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
    background: rgba(0, 0, 0, 0.1);
}

.drunel-password-wrapper:focus-within .drunel-password-toggle {
    color: #333;
}

.drunel-form input[type="text"]:focus,
.drunel-form input[type="email"]:focus,
.drunel-form input[type="password"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.drunel-form input[type="text"]:invalid,
.drunel-form input[type="email"]:invalid,
.drunel-form input[type="password"]:invalid {
    border-color: #dc3545;
}

/* ===== BOTONES ===== */
.drunel-form button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: #000;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-top: 8px; /* Espaciado desde el elemento anterior */
    margin-bottom: 6px; /* Espaciado hacia el siguiente elemento */
}

.drunel-form button:hover {
    background-color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.drunel-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.drunel-form button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== GOOGLE LOGIN ===== */
.drunel-google-wrapper {
    display: flex;
    justify-content: center; /* CENTRADO HORIZONTAL */
    margin-bottom: 8px;
    width: 100%;
    text-align: center; /* CENTRADO HORIZONTAL para elementos inline */
    padding: 0 !important; /* Eliminar cualquier padding que pueda afectar */
}

.drunel-google-button {
    display: flex;
    justify-content: center; /* CENTRADO HORIZONTAL del contenido interno */
    background: #fff;
    color: #444;
    border: 1px solid #dadce0;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    padding: 12px 16px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 280px;
    text-align: center; /* CENTRADO HORIZONTAL del texto */
    margin-left: auto; /* CENTRADO HORIZONTAL del botón */
    margin-right: auto; /* CENTRADO HORIZONTAL del botón */
}

.drunel-google-button:hover {
    background: #f8f9fa;
    border-color: #ccc;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Estilos más robustos para el botón de Google renderizado dinámicamente */
.g_id_signin {
    margin: 0 auto !important; /* CENTRADO HORIZONTAL */
    display: block !important;
    width: auto !important;
    max-width: 280px !important;
    text-align: center !important; /* CENTRADO HORIZONTAL */
    position: relative !important;
    left: 50% !important; /* POSICIÓN HORIZONTAL al 50% */
    transform: translateX(-50%) !important; /* CENTRADO HORIZONTAL perfecto */
    border-radius: 6px !important;
}

/* Forzar centrado en todos los navegadores */
.drunel-google-wrapper .g_id_signin {
    margin: 0 auto !important; /* CENTRADO HORIZONTAL */
    display: block !important;
    position: relative !important;
    left: 50% !important; /* POSICIÓN HORIZONTAL al 50% */
    transform: translateX(-50%) !important; /* CENTRADO HORIZONTAL perfecto */
    width: auto !important;
    max-width: 280px !important;
}

/* Contenedor específico para elementos internos del botón de Google */
.g_id_signin > div,
.g_id_signin iframe {
    margin: 0 auto !important; /* CENTRADO HORIZONTAL */
    display: block !important;
    text-align: center !important; /* CENTRADO HORIZONTAL */
    width: auto !important;
    max-width: 100% !important;
}

/* Forzar centrado del botón interno de Google (clases dinámicas) */
.g_id_signin [role="button"],
.g_id_signin button,
.g_id_signin div[data-idom-class] {
    margin: 0 auto !important; /* CENTRADO HORIZONTAL */
    display: block !important;
    text-align: center !important; /* CENTRADO HORIZONTAL */
    width: auto !important;
    max-width: 100% !important;
}

/* Estilos para elementos internos del botón (puede variar según la versión de Google) */
.g_id_signin .abcRioButton,
.g_id_signin .nsm7Bb-HzV7m-LgbsSe,
.g_id_signin .VfPpkd-Bz112c-LgbsSe {
    margin: 0 auto !important; /* CENTRADO HORIZONTAL */
    display: flex !important;
    justify-content: center !important; /* CENTRADO HORIZONTAL con flexbox */
    width: auto !important;
    max-width: 100% !important;
}

/* Contenido del botón */
.g_id_signin .abcRioButtonContents,
.g_id_signin .nsm7Bb-HzV7m-LgbsSe-MJoBVe,
.g_id_signin .VfPpkd-vQzf8d {
    display: flex !important;
    justify-content: center !important; /* CENTRADO HORIZONTAL con flexbox */
    text-align: center !important; /* CENTRADO HORIZONTAL del texto */
    width: 100% !important;
}

/* Icono de Google */
.g_id_signin .abcRioButtonIcon,
.g_id_signin .nsm7Bb-HzV7m-LgbsSe-Bz112c,
.g_id_signin svg {
    margin-right: 8px !important; /* Espaciado horizontal entre ícono y texto */
    float: none !important;
    display: inline-block !important;
}

/* Texto del botón */
.g_id_signin .abcRioButtonText,
.g_id_signin .nsm7Bb-HzV7m-LgbsSe-MJoBVe-Bz112c,
.g_id_signin span {
    text-align: center !important; /* CENTRADO HORIZONTAL del texto */
    display: inline-block !important;
    line-height: normal !important;
}

/* Forzar centrado en resoluciones específicas */
@media screen and (min-width: 320px) {
    .g_id_signin {
        margin-left: auto !important;
        margin-right: auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Centrado específico para móviles */
@media screen and (max-width: 768px) {
    .drunel-google-wrapper {
        padding: 0 10px !important;
    }
    
    .g_id_signin {
        max-width: calc(100% - 20px) !important;
        width: auto !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Centrado para tablets */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .g_id_signin {
        max-width: 280px !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Centrado para desktop */
@media screen and (min-width: 1025px) {
    .g_id_signin {
        max-width: 280px !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* ===== RECAPTCHA ===== */
.drunel-recaptcha-wrapper {
    transform: scale(0.85);
    transform-origin: top left;
    margin-bottom: 8px; /* Reducido de 16px a 8px */
    display: flex;
    justify-content: center;
}

@media (max-width: 480px) {
    .drunel-recaptcha-wrapper {
        transform: scale(0.75);
    }
}

/* ===== MENSAJES DE ERROR ===== */
.drunel-form-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0; /* Reducido de 12px a 8px */
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drunel-form-error::before {
    content: "⚠️";
    font-size: 16px;
}

.drunel-form-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0; /* Reducido de 12px a 8px */
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drunel-form-success::before {
    content: "✅";
    font-size: 16px;
}

/* Estilos para mensajes de éxito en validación de tokens */
.drunel-form-error[style*="color: green"],
.drunel-form-error.success {
    color: #155724 !important;
    background: #d4edda !important;
    border: 1px solid #c3e6cb !important;
}

.drunel-form-error[style*="color: green"]::before,
.drunel-form-error.success::before {
    content: "✅" !important;
}

/* ===== POPUP ===== */
#drunel-login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(3px);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#drunel-login-popup .drunel-auth-wrapper {
    max-width: 400px;
    width: 100%;
    background: #fff;
    position: relative;
    margin: 0;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

#drunel-login-popup .drunel-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    z-index: 10001;
    padding: 10px;
    line-height: 1;
    font-weight: bold;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#drunel-login-popup .drunel-close:hover {
    color: #ff4444;
    transform: scale(1.2);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ===== FORMULARIO DE RESET ===== */
.drunel-form-reset {
    padding: 32px 24px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    max-width: 400px;
    margin: 2rem auto;
    border: 1px solid #e0e0e0;
}

/* ===== ENLACES Y TEXTO AUXILIAR ===== */
.drunel-reset-link {
    text-align: center;
    margin-top: 12px; /* Reducido de 16px a 12px */
    padding-top: 12px; /* Reducido de 16px a 12px */
    border-top: 1px solid #eee;
}

.drunel-reset-link a {
    font-size: 0.9em;
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.drunel-reset-link a:hover {
    text-decoration: underline;
    color: #005a87;
}

.drunel-hint-text {
    display: block;
    margin-top: 2px; /* Reducido de 4px a 2px para estar más cerca */
    margin-bottom: 6px; /* Espaciado hacia el siguiente elemento */
    font-size: 13px; /* Reducido de 0.8rem (~12.8px) a 13px */
    color: #666;
    line-height: 1.3;
}

/* ===== CAMPOS ESPECÍFICOS ===== */
#drunel_token {
    margin-bottom: 6px; /* Reducido de 8px a 6px */
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 18px;
}

/* ===== ESPACIADO ===== */
.drunel-auth-wrapper input,
.drunel-auth-wrapper .g-recaptcha,
.drunel-auth-wrapper button,
.drunel-auth-wrapper .drunel-google-button {
    margin-bottom: 8px; /* Reducido de 12px a 8px */
}

.drunel-auth-wrapper input:last-child,
.drunel-auth-wrapper button:last-child {
    margin-bottom: 0;
}

/* Espaciado específico para elementos del formulario */
.drunel-form .drunel-password-wrapper,
.drunel-form .drunel-google-wrapper,
.drunel-form .drunel-recaptcha-wrapper,
.drunel-form .drunel-terms-wrapper {
    margin-bottom: 8px;
}

/* Reducir espacio en elementos contiguos */
.drunel-password-wrapper + .drunel-password-wrapper {
    margin-top: 0;
}

/* Espaciado específico para el campo de confirmación de contraseña */
.drunel-form input[name="confirm_password"] {
    margin-top: 2px; /* Reducir espacio superior */
}

/* Espaciado para texto de ayuda después de inputs */
.drunel-form input + .drunel-hint-text {
    margin-top: 2px;
}

/* Espaciado para elementos después del texto de ayuda */
.drunel-hint-text + input,
.drunel-hint-text + .drunel-password-wrapper {
    margin-top: 4px;
}

/* Espaciado compacto para el token */
#drunel-token-wrapper {
    margin-bottom: 8px;
}

/* Asegurar que el token tenga el margen superior adecuado cuando es el primer elemento */
.drunel-form #drunel-token-wrapper:first-child,
.drunel-form .drunel-token-container:first-child {
    margin-top: 15px !important;
}

/* Margen específico para contenedores de token cuando se muestran después de ocultar otros elementos */
.drunel-form .drunel-token-container,
.drunel-form #drunel-token-wrapper {
    margin-top: 15px;
}

/* Espaciado entre el botón y elementos siguientes */
.drunel-form button + .drunel-reset-link {
    margin-top: 8px;
}

/* ===== CHECKBOX Y TÉRMINOS ===== */
.drunel-terms-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0; /* Reducido de 12px a 8px */
    font-size: 14px;
    line-height: 1.4;
}

.drunel-terms-wrapper input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
}

.drunel-terms-wrapper label {
    margin: 0;
    cursor: pointer;
    color: #555;
}

.drunel-terms-wrapper a {
    color: #007cba;
    text-decoration: none;
}

.drunel-terms-wrapper a:hover {
    text-decoration: underline;
}

/* ===== CHECKBOX DE MANTENER SESIÓN ===== */
.drunel-remember {
    text-align: center;
    margin: 8px 0;
    font-size: 13px;
}

.drunel-remember label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    color: #555;
    font-size: 13px;
}

.drunel-remember input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

/* ===== INFORMACIÓN DE CONTRASEÑA ===== */
.drunel-password-info {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* ===== MODO PREVIEW ===== */
body.drunel-preview-mode .drunel-auth-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid #007cba;
}

body.drunel-preview-mode .elementor-menu-cart__main {
    display: none !important;
    visibility: hidden !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .drunel-auth-wrapper {
        margin: 1rem;
        padding: 1rem;
        max-width: none;
    }
    
    .drunel-tab {
        padding: 0.6rem 0.5rem;
        font-size: 13px;
    }
    
    .drunel-form input[type="text"],
    .drunel-form input[type="email"],
    .drunel-form input[type="password"],
    .drunel-form button {
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    /* Ajustar tamaño del ojo en móvil - estilos ya definidos arriba */
}

@media (max-width: 480px) {
    #drunel-login-popup {
        padding: 10px;
    }
    
    .drunel-form-reset {
        margin: 1rem;
        padding: 20px 16px;
    }
    
    .drunel-recaptcha-wrapper {
        transform: scale(0.7);
    }
    
    /* Mejorar el botón de cierre en móviles */
    #drunel-login-popup .drunel-close {
        top: 5px;
        right: 5px;
        width: 50px;
        height: 50px;
        font-size: 32px;
        touch-action: manipulation;
        color: #ffffff;
        background: transparent;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }
    
    #drunel-login-popup .drunel-close:hover {
        transform: scale(1.25);
        color: #ff4444;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    .drunel-tab,
    .drunel-form button,
    .drunel-google-button,
    .drunel-form input,
    #drunel-login-popup,
    #drunel-login-popup .drunel-auth-wrapper {
        transition: none;
        animation: none;
    }
}

/* ===== ESTADOS DE CARGA ===== */
.drunel-loading {
    position: relative;
    overflow: hidden;
}

.drunel-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== BYPASS DE CACHE VISUAL (OPCIONAL) ===== */
.drunel-cache-refresh {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drunel-cache-refresh::before {
    content: "Actualizando...";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 999999;
    pointer-events: none;
    display: none; /* Oculto por defecto */
}

/* ===== FOCUS VISIBLE ===== */
.drunel-tab:focus-visible,
.drunel-form button:focus-visible,
.drunel-google-button:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.drunel-form input:focus-visible {
    outline: none; /* Ya tiene su propio estilo de focus */
}

/* Ocultar iconos de password toggle en formularios de verificación */
.drunel-form.token-verification .drunel-password-toggle,
.drunel-token-form .drunel-password-toggle,
.drunel-form[data-step="token"] .drunel-password-toggle {
    display: none !important;
}

/* Asegurar que los inputs de token no tengan padding extra para el ojito */
.drunel-token-input,
.drunel-form.token-verification input[type="text"],
.drunel-form[data-step="token"] input[type="text"] {
    padding-right: 12px !important;
}

/* Margen superior específico para el input de token */
.drunel-token-input {
    margin-top: 15px;
}

/* ===== ANIMACIONES PARA RESALTAR FORMULARIO EXISTENTE ===== */

/* Animación de highlight cuando se evita popup duplicado */
@keyframes drunelHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0.7), 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
    25% {
        box-shadow: 0 0 0 8px rgba(0, 124, 186, 0.4), 0 4px 20px rgba(0, 124, 186, 0.3);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(0, 124, 186, 0.2), 0 6px 25px rgba(0, 124, 186, 0.2);
        transform: scale(1.03);
    }
    75% {
        box-shadow: 0 0 0 8px rgba(0, 124, 186, 0.1), 0 4px 20px rgba(0, 124, 186, 0.15);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
}

/* Animación de pulse suave */
@keyframes drunelPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Clase para aplicar la animación de highlight */
.drunel-auth-wrapper.drunel-highlight {
    animation: drunelHighlight 2s ease-out;
}

/* Clase para aplicar animación de pulse a elementos internos */
.drunel-auth-wrapper.drunel-highlight .drunel-tabs {
    animation: drunelPulse 1s ease-in-out;
}

/* Efecto adicional para los inputs durante el highlight */
.drunel-auth-wrapper.drunel-highlight input:first-of-type {
    border-color: #007cba !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2) !important;
    transition: all 0.3s ease;
}

/* Smooth scroll para mejor UX */
html {
    scroll-behavior: smooth;
}

/* ===== MENSAJE DE ESPERA ===== */
.drunel-waiting-message {
    position: relative;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 15px 0;
    text-align: center;
    color: #1a5490;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.4s ease-out;
}

.drunel-waiting-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.drunel-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #b3d9ff;
    border-top: 2px solid #1a5490;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.drunel-waiting-text {
    font-weight: 500;
    line-height: 1.4;
}

/* Animación del spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animación de entrada para el mensaje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FIN ANIMACIONES ===== */

/* === TOAST DE BIENVENIDA === */

/* Estilos para el toast de bienvenida */
.drunel-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #EAF7EE;
    color: #333333;
    padding: 0;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
    z-index: 1000000;
    min-width: 300px;
    max-width: 400px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.drunel-toast.drunel-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.drunel-toast-content {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    gap: 12px;
}

.drunel-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    color: #28a745;
}

.drunel-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.drunel-toast-close {
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex-shrink: 0;
    color: #666666;
}

.drunel-toast-close:hover {
    background: rgba(0,0,0,0.1);
    color: #333333;
}

.drunel-toast-close:active {
    background: rgba(0,0,0,0.15);
}

.drunel-toast-success {
    background: #EAF7EE;
    border-color: #d9d9d9;
}

/* Responsive para toast */
@media (max-width: 768px) {
    .drunel-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Animación de entrada para toast */
@keyframes drunel-toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación de salida para toast */
@keyframes drunel-toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ===== ESTILOS ADICIONALES PARA FORZAR CENTRADO HORIZONTAL DEL BOTÓN DE GOOGLE ===== */

/* Centrado con flexbox como respaldo */
.drunel-google-wrapper {
    display: flex !important;
    justify-content: center !important; /* CENTRADO HORIZONTAL con flexbox */
    flex-direction: column !important;
}

/* Centrado usando grid como segunda opción */
@supports (display: grid) {
    .drunel-google-wrapper {
        display: grid !important;
        justify-items: center !important; /* CENTRADO HORIZONTAL con grid */
        grid-template-columns: 1fr !important;
    }
}

/* Centrado usando text-align como tercera opción */
.drunel-google-wrapper {
    text-align: center !important; /* CENTRADO HORIZONTAL con text-align */
}

/* Asegurar que todos los elementos internos del botón de Google estén centrados */
.g_id_signin,
.g_id_signin *,
.g_id_signin > div,
.g_id_signin iframe,
.g_id_signin [role="button"],
.g_id_signin button {
    box-sizing: border-box !important;
}

/* Prevenir que elementos floten */
.g_id_signin * {
    float: none !important;
    clear: both !important;
}

/* Forzar centrado en resoluciones específicas */
@media screen and (min-width: 320px) {
    .g_id_signin {
        margin-left: auto !important;
        margin-right: auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Centrado específico para móviles */
@media screen and (max-width: 768px) {
    .drunel-google-wrapper {
        padding: 0 10px !important;
    }
    
    .g_id_signin {
        max-width: calc(100% - 20px) !important;
        width: auto !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Centrado para tablets */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .g_id_signin {
        max-width: 280px !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* Centrado para desktop */
@media screen and (min-width: 1025px) {
    .g_id_signin {
        max-width: 280px !important;
        margin: 0 auto !important;
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* ===== RECAPTCHA ===== */
.drunel-recaptcha-wrapper {
    transform: scale(0.85);
    transform-origin: top left;
    margin-bottom: 8px; /* Reducido de 16px a 8px */
    display: flex;
    justify-content: center;
}

@media (max-width: 480px) {
    .drunel-recaptcha-wrapper {
        transform: scale(0.75);
    }
}

/* ===== MENSAJES DE ERROR ===== */
.drunel-form-error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0; /* Reducido de 12px a 8px */
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drunel-form-error::before {
    content: "⚠️";
    font-size: 16px;
}

.drunel-form-success {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0; /* Reducido de 12px a 8px */
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.drunel-form-success::before {
    content: "✅";
    font-size: 16px;
}

/* Estilos para mensajes de éxito en validación de tokens */
.drunel-form-error[style*="color: green"],
.drunel-form-error.success {
    color: #155724 !important;
    background: #d4edda !important;
    border: 1px solid #c3e6cb !important;
}

.drunel-form-error[style*="color: green"]::before,
.drunel-form-error.success::before {
    content: "✅" !important;
}

/* ===== POPUP ===== */
#drunel-login-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    backdrop-filter: blur(3px);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#drunel-login-popup .drunel-auth-wrapper {
    max-width: 400px;
    width: 100%;
    background: #fff;
    position: relative;
    margin: 0;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from { transform: translateY(50px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

#drunel-login-popup .drunel-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    z-index: 10001;
    padding: 10px;
    line-height: 1;
    font-weight: bold;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#drunel-login-popup .drunel-close:hover {
    color: #ff4444;
    transform: scale(1.2);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ===== FORMULARIO DE RESET ===== */
.drunel-form-reset {
    padding: 32px 24px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    max-width: 400px;
    margin: 2rem auto;
    border: 1px solid #e0e0e0;
}

/* ===== ENLACES Y TEXTO AUXILIAR ===== */
.drunel-reset-link {
    text-align: center;
    margin-top: 12px; /* Reducido de 16px a 12px */
    padding-top: 12px; /* Reducido de 16px a 12px */
    border-top: 1px solid #eee;
}

.drunel-reset-link a {
    font-size: 0.9em;
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.drunel-reset-link a:hover {
    text-decoration: underline;
    color: #005a87;
}

.drunel-hint-text {
    display: block;
    margin-top: 2px; /* Reducido de 4px a 2px para estar más cerca */
    margin-bottom: 6px; /* Espaciado hacia el siguiente elemento */
    font-size: 13px; /* Reducido de 0.8rem (~12.8px) a 13px */
    color: #666;
    line-height: 1.3;
}

/* ===== CAMPOS ESPECÍFICOS ===== */
#drunel_token {
    margin-bottom: 6px; /* Reducido de 8px a 6px */
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 18px;
}

/* ===== ESPACIADO ===== */
.drunel-auth-wrapper input,
.drunel-auth-wrapper .g-recaptcha,
.drunel-auth-wrapper button,
.drunel-auth-wrapper .drunel-google-button {
    margin-bottom: 8px; /* Reducido de 12px a 8px */
}

.drunel-auth-wrapper input:last-child,
.drunel-auth-wrapper button:last-child {
    margin-bottom: 0;
}

/* Espaciado específico para elementos del formulario */
.drunel-form .drunel-password-wrapper,
.drunel-form .drunel-google-wrapper,
.drunel-form .drunel-recaptcha-wrapper,
.drunel-form .drunel-terms-wrapper {
    margin-bottom: 8px;
}

/* Reducir espacio en elementos contiguos */
.drunel-password-wrapper + .drunel-password-wrapper {
    margin-top: 0;
}

/* Espaciado específico para el campo de confirmación de contraseña */
.drunel-form input[name="confirm_password"] {
    margin-top: 2px; /* Reducir espacio superior */
}

/* Espaciado para texto de ayuda después de inputs */
.drunel-form input + .drunel-hint-text {
    margin-top: 2px;
}

/* Espaciado para elementos después del texto de ayuda */
.drunel-hint-text + input,
.drunel-hint-text + .drunel-password-wrapper {
    margin-top: 4px;
}

/* Espaciado compacto para el token */
#drunel-token-wrapper {
    margin-bottom: 8px;
}

/* Asegurar que el token tenga el margen superior adecuado cuando es el primer elemento */
.drunel-form #drunel-token-wrapper:first-child,
.drunel-form .drunel-token-container:first-child {
    margin-top: 15px !important;
}

/* Margen específico para contenedores de token cuando se muestran después de ocultar otros elementos */
.drunel-form .drunel-token-container,
.drunel-form #drunel-token-wrapper {
    margin-top: 15px;
}

/* Espaciado entre el botón y elementos siguientes */
.drunel-form button + .drunel-reset-link {
    margin-top: 8px;
}

/* ===== CHECKBOX Y TÉRMINOS ===== */
.drunel-terms-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0; /* Reducido de 12px a 8px */
    font-size: 14px;
    line-height: 1.4;
}

.drunel-terms-wrapper input[type="checkbox"] {
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
}

.drunel-terms-wrapper label {
    margin: 0;
    cursor: pointer;
    color: #555;
}

.drunel-terms-wrapper a {
    color: #007cba;
    text-decoration: none;
}

.drunel-terms-wrapper a:hover {
    text-decoration: underline;
}

/* ===== CHECKBOX DE MANTENER SESIÓN ===== */
.drunel-remember {
    text-align: center;
    margin: 8px 0;
    font-size: 13px;
}

.drunel-remember label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    color: #555;
    font-size: 13px;
}

.drunel-remember input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

/* ===== INFORMACIÓN DE CONTRASEÑA ===== */
.drunel-password-info {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* ===== MODO PREVIEW ===== */
body.drunel-preview-mode .drunel-auth-wrapper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid #007cba;
}

body.drunel-preview-mode .elementor-menu-cart__main {
    display: none !important;
    visibility: hidden !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .drunel-auth-wrapper {
        margin: 1rem;
        padding: 1rem;
        max-width: none;
    }
    
    .drunel-tab {
        padding: 0.6rem 0.5rem;
        font-size: 13px;
    }
    
    .drunel-form input[type="text"],
    .drunel-form input[type="email"],
    .drunel-form input[type="password"],
    .drunel-form button {
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    /* Ajustar tamaño del ojo en móvil - estilos ya definidos arriba */
}

@media (max-width: 480px) {
    #drunel-login-popup {
        padding: 10px;
    }
    
    .drunel-form-reset {
        margin: 1rem;
        padding: 20px 16px;
    }
    
    .drunel-recaptcha-wrapper {
        transform: scale(0.7);
    }
    
    /* Mejorar el botón de cierre en móviles */
    #drunel-login-popup .drunel-close {
        top: 5px;
        right: 5px;
        width: 50px;
        height: 50px;
        font-size: 32px;
        touch-action: manipulation;
        color: #ffffff;
        background: transparent;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }
    
    #drunel-login-popup .drunel-close:hover {
        transform: scale(1.25);
        color: #ff4444;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    .drunel-tab,
    .drunel-form button,
    .drunel-google-button,
    .drunel-form input,
    #drunel-login-popup,
    #drunel-login-popup .drunel-auth-wrapper {
        transition: none;
        animation: none;
    }
}

/* ===== ESTADOS DE CARGA ===== */
.drunel-loading {
    position: relative;
    overflow: hidden;
}

.drunel-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== BYPASS DE CACHE VISUAL (OPCIONAL) ===== */
.drunel-cache-refresh {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drunel-cache-refresh::before {
    content: "Actualizando...";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 999999;
    pointer-events: none;
    display: none; /* Oculto por defecto */
}

/* ===== FOCUS VISIBLE ===== */
.drunel-tab:focus-visible,
.drunel-form button:focus-visible,
.drunel-google-button:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.drunel-form input:focus-visible {
    outline: none; /* Ya tiene su propio estilo de focus */
}

/* Ocultar iconos de password toggle en formularios de verificación */
.drunel-form.token-verification .drunel-password-toggle,
.drunel-token-form .drunel-password-toggle,
.drunel-form[data-step="token"] .drunel-password-toggle {
    display: none !important;
}

/* Asegurar que los inputs de token no tengan padding extra para el ojito */
.drunel-token-input,
.drunel-form.token-verification input[type="text"],
.drunel-form[data-step="token"] input[type="text"] {
    padding-right: 12px !important;
}

/* Margen superior específico para el input de token */
.drunel-token-input {
    margin-top: 15px;
}

/* ===== ANIMACIONES PARA RESALTAR FORMULARIO EXISTENTE ===== */

/* Animación de highlight cuando se evita popup duplicado */
@keyframes drunelHighlight {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 124, 186, 0.7), 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
    25% {
        box-shadow: 0 0 0 8px rgba(0, 124, 186, 0.4), 0 4px 20px rgba(0, 124, 186, 0.3);
        transform: scale(1.02);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(0, 124, 186, 0.2), 0 6px 25px rgba(0, 124, 186, 0.2);
        transform: scale(1.03);
    }
    75% {
        box-shadow: 0 0 0 8px rgba(0, 124, 186, 0.1), 0 4px 20px rgba(0, 124, 186, 0.15);
        transform: scale(1.01);
    }
    100% {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        transform: scale(1);
    }
}

/* Animación de pulse suave */
@keyframes drunelPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Clase para aplicar la animación de highlight */
.drunel-auth-wrapper.drunel-highlight {
    animation: drunelHighlight 2s ease-out;
}

/* Clase para aplicar animación de pulse a elementos internos */
.drunel-auth-wrapper.drunel-highlight .drunel-tabs {
    animation: drunelPulse 1s ease-in-out;
}

/* Efecto adicional para los inputs durante el highlight */
.drunel-auth-wrapper.drunel-highlight input:first-of-type {
    border-color: #007cba !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2) !important;
    transition: all 0.3s ease;
}

/* Smooth scroll para mejor UX */
html {
    scroll-behavior: smooth;
}

/* ===== MENSAJE DE ESPERA ===== */
.drunel-waiting-message {
    position: relative;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 15px 0;
    text-align: center;
    color: #1a5490;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.4s ease-out;
}

.drunel-waiting-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.drunel-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #b3d9ff;
    border-top: 2px solid #1a5490;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.drunel-waiting-text {
    font-weight: 500;
    line-height: 1.4;
}

/* Animación del spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animación de entrada para el mensaje */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FIN ANIMACIONES ===== */

/* === TOAST DE BIENVENIDA === */

/* Estilos para el toast de bienvenida */
.drunel-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #EAF7EE;
    color: #333333;
    padding: 0;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
    z-index: 1000000;
    min-width: 300px;
    max-width: 400px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.drunel-toast.drunel-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.drunel-toast-content {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    gap: 12px;
}

.drunel-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    color: #28a745;
}

.drunel-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.drunel-toast-close {
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    flex-shrink: 0;
    color: #666666;
}

.drunel-toast-close:hover {
    background: rgba(0,0,0,0.1);
    color: #333333;
}

.drunel-toast-close:active {
    background: rgba(0,0,0,0.15);
}

.drunel-toast-success {
    background: #EAF7EE;
    border-color: #d9d9d9;
}

/* Responsive para toast */
@media (max-width: 768px) {
    .drunel-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Animación de entrada para toast */
@keyframes drunel-toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animación de salida para toast */
@keyframes drunel-toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}
