
/* =========================================
   PREPARATUENSAYO - ACCOUNT MENU
========================================= */

.account-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Botón principal */

[data-auth-start] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #1D4ED8;
    color: #FFFFFF;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s ease;
}

[data-auth-start]:hover {
    background: #12316B;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, .18);
}

/* Botón con sesión iniciada */

[data-auth-start].account-logged-in {
    background: #EFF6FF;
    color: #1D4ED8;
    border-color: #DBEAFE;
    border-radius: 10px;
}

[data-auth-start].account-logged-in:hover {
    background: #DBEAFE;
}

/* Indicador de menú abierto */

.account-wrapper.dropdown-open [data-auth-start] {
    background: #DBEAFE;
}

/* =========================================
   DROPDOWN
========================================= */

.account-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    padding: 7px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 13px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .12);
    z-index: 1000;

    animation: accountDropdownIn .18s ease;
}

.account-dropdown[hidden] {
    display: none;
}

@keyframes accountDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Opciones */

.account-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #334155;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.account-option i {
    width: 17px;
    height: 17px;
    color: #64748B;
    flex-shrink: 0;
}

.account-option:hover {
    background: #EFF6FF;
    color: #1D4ED8;
}

.account-option:hover i {
    color: #1D4ED8;
}

/* Separador */

.account-divider {
    height: 1px;
    background: #E2E8F0;
    margin: 6px 4px;
}

/* Cerrar sesión */

.logout-option {
    color: #DC2626;
}

.logout-option i {
    color: #DC2626;
}

.logout-option:hover {
    background: #FEF2F2;
    color: #B91C1C;
}

.logout-option:hover i {
    color: #B91C1C;
}

.logout-option:disabled {
    opacity: .6;
    cursor: wait;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 768px) {
    .account-wrapper {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    [data-auth-start] {
        width: 100%;
        min-height: 42px;
        justify-content: center;
    }

    .account-dropdown {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-top: 9px;
        box-shadow: 0 5px 18px rgba(15, 23, 42, .08);
    }
}
