/* Account Dropdown Styles */

/* Container */
.user-account-dropdown {
    position: relative;
    margin-left: 15px;
    margin-right: 15px;
}

/* Login Button when not logged in */
.btn-login {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    min-height: 44px;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background: var(--bg-dark-2);
    transform: translateY(-2px);
    color: white;
}

.btn-login img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

/* Account Toggle Button */
.account-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    min-height: 44px;
}

.account-toggle:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.account-toggle.active {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.account-toggle img {
    width: 22px;
    height: 22px;
}

.account-toggle .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--title-font-color);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.account-toggle i {
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
}

.account-toggle.active i {
    transform: rotate(180deg);
}

/* Account Menu Dropdown */
.account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 99999;
}

.account-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 99999;
}

/* Account Menu Header */
.account-menu-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    flex-shrink: 0;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--bg-light);
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-details .user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--title-font-color);
    margin-bottom: 5px;
}

.user-details .user-email {
    font-size: 13px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Account Menu Items */
.account-menu-items {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.account-menu-items li {
    margin: 0;
}

.account-menu-items li.divider {
    height: 1px;
    background: #f0f0f0;
    margin: 10px 0;
}

.account-menu-items li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--body-font-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.account-menu-items li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.account-menu-items li a i {
    width: 20px;
    font-size: 16px;
    color: var(--primary-color);
    text-align: center;
}

.account-menu-items li a span {
    font-size: 14px;
    font-weight: 500;
}

.account-menu-items li:last-child a {
    color: #e74c3c;
}

.account-menu-items li:last-child a i {
    color: #e74c3c;
}

.account-menu-items li:last-child a:hover {
    background: #fee;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .user-account-dropdown {
        margin-left: 10px;
        margin-right: 10px;
        position: static;
    }
    
    .account-toggle .user-name {
        display: none;
    }
    
    .account-toggle {
        padding: 8px;
        border-radius: 50%;
        min-height: 40px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .account-toggle i {
        display: none;
    }
    
    .account-menu {
        position: fixed;
        top: 70px;
        right: 10px;
        left: auto;
        min-width: 280px;
        max-width: calc(100vw - 20px);
        z-index: 999999;
    }
    
    .account-menu.active {
        z-index: 999999;
    }
    
    .btn-login span {
        display: none;
    }
    
    .btn-login {
        padding: 10px;
        border-radius: 50%;
        min-height: 40px;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    /* Ensure dropdown is above header */
    .header-area {
        position: relative;
        z-index: 1000;
    }
    
    /* Ensure clean white background and proper shadow for mobile */
    .account-menu {
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    }
}