/* ==========================================================================
   User Portal - Header Dropdown
   ========================================================================== */

/* Toolbar Wrapper (Search + Portal)
   ========================================================================== */

.user-portal-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-portal-toolbar__search {
    display: flex;
    align-items: center;
}

/* Reset any default button styles on the search icon trigger */
.user-portal-toolbar__search .live-search-icon-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.user-portal-toolbar__search .live-search-icon-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.user-portal {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Trigger Icon
   ========================================================================== */

.user-portal__trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.user-portal__trigger:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.user-portal__icon {
    width: 24px;
    height: 24px;
    color: #333;
}

/* Dropdown Panel
   ========================================================================== */

.user-portal__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 240px;
    padding: 8px 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 9999;
}

.user-portal:hover .user-portal__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Invisible bridge to prevent dropdown closing when moving mouse */
.user-portal__dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

/* Dropdown Items
   ========================================================================== */

.user-portal__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.user-portal__item:hover {
    background-color: #f7f7f7;
}

.user-portal__item:hover span {
	color: var(--bb-primary-color) !important;
}

.user-portal__item:focus {
    outline: none;
    background-color: #f0f0f0;
}

.user-portal__item-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #666;
}

/* Profile Item (Logged In)
   ========================================================================== */

.user-portal__profile {
    gap: 12px;
    padding: 12px 20px;
}

.user-portal__profile:hover {
    background-color: #f7f7f7;
}

.user-portal__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background-color: #f0f0f0;
    border-radius: 50%;
    color: #999;
}

.user-portal__avatar svg {
    width: 22px;
    height: 22px;
}

.user-portal__user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-portal__name {
    font-size: 15px;
    font-weight: 700;
    color: #c84b20;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-portal__username {
    font-size: 13px;
    font-weight: 500;
    color: #c84b20;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashboard Item Icon Color */
.user-portal__item .user-portal__item-icon {
    color: var(--bb-primary-color);
}

.user-portal__item:not(.user-portal__profile):not(.user-portal__logout) span {
    color: #333;
}

/* Divider
   ========================================================================== */

.user-portal__divider {
    height: 1px;
    margin: 4px 0;
    background-color: #eee;
}

/* Responsive
   ========================================================================== */

@media (max-width: 767px) {
    .user-portal__dropdown {
        min-width: 200px;
        right: -8px;
    }
}
