/* ============================================
   PREMIUM USER DROPDOWN - Modern & Elegant
   ============================================ */

/* User Button Container */
.user-dropdown-container {
    position: relative;
    display: inline-block;
}

/* User Trigger Button */
.user-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #00b4b4 0%, #00d4d4 50%, #00b4b4 100%);
    background-size: 200% 200%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 180, 180, 0.3);
    position: relative;
    overflow: hidden;
}

.user-dropdown-trigger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.user-dropdown-trigger:hover::before {
    left: 100%;
}

.user-dropdown-trigger:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 180, 180, 0.4);
}

.user-dropdown-trigger:active {
    transform: translateY(0);
}

/* User Avatar */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    object-fit: cover;
    transition: all 0.3s ease;
}

.user-dropdown-trigger:hover .user-avatar {
    border-color: #fff;
    transform: scale(1.05);
}

/* User Name */
.user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Dropdown Arrow */
.dropdown-arrow {
    color: #fff;
    width: 12px;
    height: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0.25rem;
    flex-shrink: 0;
}

.user-dropdown-container.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* SVG Icon Styling */
.menu-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.menu-arrow {
    width: 14px;
    height: 14px;
    color: #cbd5e1;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.dropdown-menu-item:hover .menu-arrow {
    transform: translateX(4px);
    color: #00b4b4;
}

.verified-badge svg {
    width: 10px;
    height: 10px;
    fill: #fff;
}

.dropdown-logout svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.dropdown-logout:hover svg {
    transform: translateX(-3px);
}

/* ============================================
   PREMIUM DROPDOWN MENU
   ============================================ */

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    min-width: 320px;
    background: linear-gradient(145deg, rgba(10, 25, 47, 0.98), rgba(17, 34, 64, 0.98));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 212, 0.2);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 212, 212, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
}

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 25px;
    width: 16px;
    height: 16px;
    background: linear-gradient(145deg, rgba(10, 25, 47, 0.98), rgba(17, 34, 64, 0.98));
    transform: rotate(45deg);
    border-top: 1px solid rgba(0, 212, 212, 0.2);
    border-left: 1px solid rgba(0, 212, 212, 0.2);
}

.user-dropdown-container.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* ============================================
   DROPDOWN HEADER - User Info Section
   ============================================ */

.dropdown-user-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #0a192f 0%, #112240 100%);
    position: relative;
    overflow: hidden;
}

.dropdown-user-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 180, 180, 0.2) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.dropdown-avatar-wrapper {
    position: relative;
}

.dropdown-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #00d4d4;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 212, 212, 0.4);
    transition: all 0.3s ease;
}

.dropdown-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 212, 212, 0.6);
}

.online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border: 2px solid #0a192f;
    border-radius: 50%;
    animation: online-pulse 2s ease-in-out infinite;
}

@keyframes online-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
}

.dropdown-user-details {
    flex: 1;
}

.dropdown-user-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00d4d4, #00b4b4);
    border-radius: 50%;
    font-size: 0.6rem;
}

.verified-badge i {
    color: #fff;
}

.dropdown-user-email {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.dropdown-user-role {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 212, 0.2);
    border: 1px solid rgba(0, 212, 212, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #00d4d4;
    font-weight: 500;
}

/* ============================================
   DROPDOWN MENU ITEMS
   ============================================ */

.dropdown-menu-body {
    padding: 0.75rem 0;
    background: transparent;
}

.dropdown-menu-section {
    padding: 0.5rem 1rem;
}

.dropdown-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(148, 163, 184, 0.8);
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.dropdown-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dropdown-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #00d4d4, #00b4b4);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dropdown-menu-item:hover {
    background: linear-gradient(90deg, rgba(0, 212, 212, 0.15), transparent);
    color: #fff;
    padding-left: 1.75rem;
}

.dropdown-menu-item:hover::before {
    transform: scaleY(1);
}

.dropdown-menu-item:hover .menu-icon {
    transform: scale(1.15) rotate(-5deg);
    color: #00d4d4;
    background: rgba(0, 212, 212, 0.2);
}

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0, 212, 212, 0.1);
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.menu-text {
    flex: 1;
}

.menu-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.menu-description {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.menu-badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: #fff;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.menu-arrow {
    color: #64748b;
}

.dropdown-menu-item:hover .menu-arrow {
    color: #00d4d4;
}

/* menu-arrow styles moved to SVG Icon Styling section */

/* ============================================
   DIVIDER
   ============================================ */

.dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 212, 0.3), transparent);
    margin: 0.5rem 1.5rem;
}

/* ============================================
   PREMIUM FEATURES BOX
   ============================================ */

.dropdown-premium-box {
    margin: 0.75rem 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 180, 180, 0.15), rgba(0, 212, 212, 0.1));
    border: 1px solid rgba(0, 212, 212, 0.3);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.dropdown-premium-box::before {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1) rotate(15deg);
    }
}

.premium-title {
    font-weight: 700;
    color: #00d4d4;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.premium-description {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.8);
}

/* ============================================
   LOGOUT BUTTON
   ============================================ */

.dropdown-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.75rem 1rem 1rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border: 1px solid #fca5a5;
    border-radius: 12px;
    color: #dc2626;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dropdown-logout:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    border-color: #dc2626;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}

.dropdown-logout i {
    transition: transform 0.3s ease;
}

.dropdown-logout:hover i {
    transform: translateX(-3px);
}

/* ============================================
   QUICK ACCESS STATS
   ============================================ */

.dropdown-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
}

.stat-item {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: rgba(0, 212, 212, 0.08);
    border: 1px solid rgba(0, 212, 212, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-3px);
    background: rgba(0, 212, 212, 0.15);
    border-color: rgba(0, 212, 212, 0.3);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    color: #94a3b8;
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

[data-theme="dark"] .user-dropdown-menu,
.dark .user-dropdown-menu {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .user-dropdown-menu::before,
.dark .user-dropdown-menu::before {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dropdown-menu-item,
.dark .dropdown-menu-item {
    color: #e2e8f0;
}

[data-theme="dark"] .dropdown-menu-item:hover,
.dark .dropdown-menu-item:hover {
    background: linear-gradient(90deg, rgba(0, 212, 212, 0.15), transparent);
    color: #fff;
}

[data-theme="dark"] .menu-icon,
.dark .menu-icon {
    background: rgba(0, 212, 212, 0.15);
}

[data-theme="dark"] .menu-description,
.dark .menu-description {
    color: #64748b;
}

[data-theme="dark"] .dropdown-divider,
.dark .dropdown-divider {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

[data-theme="dark"] .dropdown-stats,
.dark .dropdown-stats {
    background: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .stat-item,
.dark .stat-item {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .stat-value,
.dark .stat-value {
    color: #fff;
}

[data-theme="dark"] .dropdown-section-title,
.dark .dropdown-section-title {
    color: #94a3b8;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 576px) {
    .user-dropdown-menu {
        position: fixed;
        top: auto !important;
        bottom: 0;
        left: 0;
        right: 0;
        min-width: 100%;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        max-height: 85vh;
        overflow-y: auto;
    }

    .user-dropdown-menu::before {
        display: none;
    }

    .user-dropdown-container.active .user-dropdown-menu {
        transform: translateY(0);
    }

    .dropdown-user-header {
        padding: 2rem 1.5rem;
    }

    .dropdown-avatar {
        width: 70px;
        height: 70px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-container.active .dropdown-menu-item {
    animation: fadeInUp 0.4s ease forwards;
}

.user-dropdown-container.active .dropdown-menu-item:nth-child(1) {
    animation-delay: 0.05s;
}

.user-dropdown-container.active .dropdown-menu-item:nth-child(2) {
    animation-delay: 0.1s;
}

.user-dropdown-container.active .dropdown-menu-item:nth-child(3) {
    animation-delay: 0.15s;
}

.user-dropdown-container.active .dropdown-menu-item:nth-child(4) {
    animation-delay: 0.2s;
}

.user-dropdown-container.active .dropdown-menu-item:nth-child(5) {
    animation-delay: 0.25s;
}

.user-dropdown-container.active .dropdown-menu-item:nth-child(6) {
    animation-delay: 0.3s;
}

/* ============================================
   RTL SUPPORT - Right to Left Direction
   ============================================ */

[dir="rtl"] .user-dropdown-menu {
    right: auto;
    left: 0;
    transform-origin: top left;
}

[dir="rtl"] .user-dropdown-menu::before {
    right: auto;
    left: 25px;
}

[dir="rtl"] .dropdown-user-header::before {
    right: auto;
    left: -50%;
}

[dir="rtl"] .dropdown-user-info {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .dropdown-user-details {
    align-items: flex-end;
}

[dir="rtl"] .dropdown-menu-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu-item .menu-arrow {
    transform: rotate(180deg);
}

[dir="rtl"] .dropdown-menu-item:hover .menu-arrow {
    transform: rotate(180deg) translateX(4px);
}

[dir="rtl"] .dropdown-logout {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-logout:hover svg {
    transform: translateX(3px);
}

[dir="rtl"] .menu-icon-wrapper {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .menu-text {
    text-align: right;
}

[dir="rtl"] .dropdown-arrow {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .user-dropdown-trigger {
    flex-direction: row-reverse;
}

[dir="rtl"] .user-name {
    margin-right: 0;
    margin-left: 0.5rem;
}