/* ==========================================================================
   Gameosophy - Modern User Profile Dropdown Styles
   ========================================================================== */

.profile-1 {
    position: relative;
}

/* User Trigger Button in Header */
.gm-header-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px 3px 4px;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gm-header-user-trigger:hover,
.gm-header-user-trigger:focus,
.show > .gm-header-user-trigger {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.gm-header-user-avatar-wrap {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gm-header-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1.5px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.gm-header-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
}

.gm-header-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.gm-header-user-chevron {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.show > .gm-header-user-trigger .gm-header-user-chevron {
    transform: rotate(180deg);
}

/* Dropdown Container */
.gm-profile-dropdown-menu {
    width: 290px;
    max-width: calc(100vw - 24px);
    padding: 0;
    margin-top: 10px !important;
    right: 0 !important;
    left: auto !important;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18), 0 0 1px 1px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    animation: gmDropdownFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: top right;
    z-index: 1060;
}

@keyframes gmDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* User Card Header */
.gm-dropdown-user-header {
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gm-dropdown-avatar-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gm-dropdown-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.gm-dropdown-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    text-transform: uppercase;
}

.gm-dropdown-google-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}

.gm-dropdown-user-info {
    min-width: 0;
    flex: 1;
}

.gm-dropdown-user-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.gm-dropdown-user-email {
    font-size: 12px;
    color: #64748b;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.gm-dropdown-provider-tag {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 9999px;
    background: #e0e7ff;
    color: #4338ca;
    line-height: 1.2;
}

.gm-dropdown-provider-tag.is-google {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

/* Links Container */
.gm-dropdown-links-list {
    padding: 6px 8px;
}

/* Individual Dropdown Item */
.gm-dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 11px;
    padding: 8px 10px !important;
    margin: 1px 0;
    border-radius: 10px;
    color: #334155 !important;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1.4;
}

.gm-dropdown-item:hover,
.gm-dropdown-item:focus {
    background: #f8fafc !important;
    color: #0f172a !important;
    transform: translateX(3px);
}

.gm-dropdown-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.16s ease;
}

.gm-dropdown-item:hover .gm-dropdown-icon {
    transform: scale(1.08);
}

/* Icon Color Palettes */
.gm-icon-profile {
    background: #ede9fe;
    color: #7c3aed;
}

.gm-icon-orders {
    background: #e0e7ff;
    color: #4f46e5;
}

.gm-icon-downloads {
    background: #dcfce7;
    color: #16a34a;
}

.gm-icon-favorites {
    background: #ffe4e6;
    color: #e11d48;
}

.gm-icon-reviews {
    background: #fef3c7;
    color: #d97706;
}

.gm-icon-settings {
    background: #e2e8f0;
    color: #475569;
}

.gm-icon-notifications {
    background: #fef08a;
    color: #ca8a04;
}

.gm-icon-support {
    background: #e0f2fe;
    color: #0284c7;
}

.gm-icon-logout {
    background: #fee2e2;
    color: #dc2626;
}

.gm-dropdown-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gm-dropdown-arrow {
    font-size: 11px;
    color: #cbd5e1;
    margin-left: auto;
    transition: all 0.16s ease;
}

.gm-dropdown-item:hover .gm-dropdown-arrow {
    color: #6366f1;
    transform: translateX(2px);
}

.gm-dropdown-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 9999px;
    background: #e11d48;
    color: #ffffff;
    margin-left: auto;
    margin-right: 4px;
    line-height: 1.3;
}

/* Divider */
.gm-dropdown-divider {
    height: 1px;
    margin: 4px 0;
    background: #f1f5f9;
}

/* Logout Item */
.gm-dropdown-logout {
    margin: 4px 8px 8px 8px !important;
    padding: 8px 10px !important;
    border-radius: 10px;
    color: #dc2626 !important;
}

.gm-dropdown-logout:hover,
.gm-dropdown-logout:focus {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

/* Guest Dropdown */
.gm-guest-dropdown-header {
    padding: 16px 16px 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.gm-guest-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.gm-guest-subtitle {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.gm-guest-btn-login {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    font-weight: 600;
    font-size: 13.5px;
    padding: 8px 14px;
    border-radius: 8px;
    color: #fff !important;
    transition: all 0.2s ease;
}

.gm-guest-btn-login:hover {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.gm-guest-btn-reg {
    font-weight: 600;
    font-size: 13.5px;
    padding: 8px 14px;
    border-radius: 8px;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
    transition: all 0.2s ease;
}

.gm-guest-btn-reg:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

.gm-guest-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155 !important;
    transition: all 0.2s ease;
}

.gm-guest-btn-google:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gm-dropdown-or {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 10px 0;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.gm-dropdown-or::before,
.gm-dropdown-or::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.gm-dropdown-or span {
    padding: 0 8px;
}

@media (max-width: 576px) {
    .gm-profile-dropdown-menu {
        width: 275px;
        right: -10px !important;
    }
}
