﻿:root {
    --primary-color: #008BF9;
    --primary-light: #e6f3ff;
    --primary-dark: #0065b3;
    --primary-gradient: linear-gradient(135deg, #008BF9 0%, #4d9fff 100%);
}

/* Wrapper */
.profile-menu-wrapper {
    position: relative;
    display: inline-block;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    direction: rtl;
}

/* Trigger */
.profile-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-gradient);
    color: #fff;
    padding: 6px 15px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 139, 249, 0.3);
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    font-weight: 500;
}

    .profile-dropdown-trigger:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 139, 249, 0.4);
    }

    .profile-dropdown-trigger .bi {
        font-size: 16px;
        transition: transform 0.3s ease;
    }

    .profile-dropdown-trigger.active .bi-chevron-down {
        transform: rotate(180deg);
    }

/* Dropdown */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 139, 249, 0.15);
    padding: 8px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    list-style: none;
    margin: 0;
    border: 1px solid rgba(0, 139, 249, 0.1);
}

.profile-menu-wrapper:hover .profile-dropdown-menu,
.profile-dropdown-trigger.active + .profile-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* List */
.profile-dropdown-menu li {
    margin: 0;
    padding: 0;
}

    /* === آیتم‌های منو (لینک + دکمه) === */
    .profile-dropdown-menu li a,
    .profile-dropdown-menu li .logout-link {
        min-height: 44px;
        padding: 0 15px;
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        font-size: 14px;
        font-weight: 500;
        color: #2c3e50;
        background: none;
        border: none;
        cursor: pointer;
        text-decoration: none;
        text-align: right;
        border-right: 3px solid transparent;
        transition: all 0.2s ease;
    }

        /* Hover یکسان */
        .profile-dropdown-menu li a:hover,
        .profile-dropdown-menu li .logout-link:hover {
            background: var(--primary-light);
            border-right-color: var(--primary-color);
            padding-right: 25px;
            color: var(--primary-color);
        }

        /* Icons */
        .profile-dropdown-menu li a .bi,
        .profile-dropdown-menu li .logout-link .bi {
            width: 20px;
            font-size: 16px;
            color: var(--primary-color);
            transition: transform 0.2s ease;
        }

        .profile-dropdown-menu li a:hover .bi,
        .profile-dropdown-menu li .logout-link:hover .bi {
            transform: scale(1.1);
        }

/* Admin */
.profile-dropdown-menu .admin-link {
    padding: 0 10px;
}

    .profile-dropdown-menu .admin-link a {
        width: 100%;
        min-height: 44px;
        margin: 6px 0; /* ❗ margin افقی حذف شد */
        padding: 0 15px;
        border-radius: 12px;
        background: var(--primary-light);
        color: var(--primary-color);
    }

/* Divider */
.dropdown-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary-color), transparent);
    margin: 8px 15px;
    opacity: 0.3;
}

/* Badge */
.badge-count {
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 11px;
    margin-right: auto;
}

/* Login Button */
.login-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-gradient);
    color: #fff;
    padding: 6px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 139, 249, 0.3);
    transition: all 0.3s ease;
}

    .login-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(0, 139, 249, 0.5);
        color: #fff;
        background: linear-gradient(135deg, #0065b3 0%, #008BF9 100%);
    }

/* Mobile */
@media (max-width: 768px) {
    .profile-dropdown-menu {
        min-width: 220px;
        left: 0;
        right: auto;
    }
}

/* Ripple */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

    .ripple-effect::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 5px;
        height: 5px;
        background: rgba(255, 255, 255, 0.5);
        opacity: 0;
        border-radius: 50%;
        transform: scale(0) translate(-50%);
    }

    .ripple-effect:focus:not(:active)::after {
        animation: ripple 0.6s ease-out;
    }

@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 0.5;
    }

    to {
        transform: scale(20);
        opacity: 0;
    }
}
