﻿@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.affiliate-item.switching {
    background-color: rgba(0, 160, 221, 0.08);
}

.avatar-circle {
    width: 24px; /* Adjust size to match icon, e.g., material icons are often 24px */
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    clip-path: circle(50% at 50% 50%); /* Additional clipping if needed */
}

.app-bar {
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 0px 15px;
    background: var(--foo-blue-gradient);
    color: white;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
}

.app-bar-title {
    margin-left: 10px;
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
}

.app-bar .material-symbols-outlined,
.app-bar .e-btn {
    color: white;
}

/* Sidebar toggle and navigation icons */
.sidebar-toggle, .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    background-color: transparent;
    margin: 0 5px;
}

    .sidebar-toggle:hover, .nav-icon1:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .sidebar-toggle:active, .nav-icon1:active {
        background-color: rgba(255, 255, 255, 0.2);
    }

/* Active subscription styling */
.affiliate-item.active-subscription {
    background-color: #f0f0f0;
    color: white;
}

.org-icon {
    margin-right: 12px;
    background-color: var(--info-subtle);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.active-subscription .adp-org-icon-gray {
    background-color: var(--info-blue2) !important;
}
    .org-icon .material-symbols-outlined {
        font-size: 22px !important;
        color: var(--foo-blue2) !important;
    }
.active-subscription .org-name {
    color: var(--foo-blue2)!important;
}
.affiliate-item.active-subscription .material-symbols-outlined, .adp-org-icon-blue {
    color: var(--foo-blue2) !important;
}

.affiliate-item.active-subscription .material-symbols-outlined, .adp-org-icon-gray {
    color: white;
}

.affiliate-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.affiliate-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .affiliate-item.clickable {
        cursor: pointer;
        border-radius: 4px;
        padding: 8px;
    }

        /* Hover states - consolidated to avoid conflicts */
        .affiliate-item.clickable:hover:not(.active-subscription) {
            background-color: rgba(3, 130, 179, 0.1);
        }

        .affiliate-item.clickable:active {
            background-color: rgba(0, 0, 0, 0.1);
        }


.profile-menu .material-symbols-outlined {
    color: var(--foo-blue2);
}
/* Organization icons and details */


.avatar {
    margin-right: 12px;
    background-color: #e0e0e0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .avatar .material-symbols-outlined {
        font-size: 40px;
        color: #5c636a !important;
    }

.org-details {
    flex: 1;
}

.org-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.org-email {
    color: #666;
    font-size: 14px;
}

.org-menu {
    color: #000;
    cursor: pointer;
}

/* Navigation items */
.nav-item {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

    .nav-item:last-child {
        margin-right: 0;
    }

    .nav-item .material-symbols-outlined {
        font-size: 28px;
        /* color: white !important;*/
    }

.app-bar .nav-item:hover {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.dropdown {
    position: relative;
}

/* Material symbols default */
.material-symbols-outlined {
    font-size: 24px;
}

/* Button styling */
.button-like-link {
    display: block;
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    border: none;
    background-color: transparent;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font-size: inherit;
}

    .button-like-link:hover {
        background-color: #f0f0f0;
    }

/* Dropdown menu */
.dropdown-menu.show {
    display: block;
    visibility: visible;
    opacity: 1;
    z-index: 1000;
    top: 50px;
    right: 0;
    position: absolute;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 10rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

/* Profile menu */
.profile-menu {
    position: absolute;
    right: 0;
    top: 100%;
    width: 320px;
    background-color: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow: hidden;
}

    .profile-menu .material-symbols-outlined {
        color: var(--foo-blue2);
    }

.dropdown-header {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.sign-out {
    color: #0078d4;
    text-decoration: none;
    font-weight: 500;
}

/* User info section */
.user-info {
    padding: 16px;
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}

    /* Updated user info styling with reduced padding */
    .user-info.login {
        border-bottom: none;
        padding: 4px 0;
        line-height: 1.1;
    }


.user-details {
    display: flex;
    flex-direction: column;
}

    .user-details .user-name {
        color: #000;
    }

.user-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.user-email {
    color: #666;
    margin-bottom: 8px;
    font-size: 14px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.view-account {
    color: #0078d4;
    text-decoration: none;
    font-size: 14px;
}

/* Affiliates section */
.affiliates {
    max-height: 320px;
    overflow-y: auto;
}

/* Affiliate container with viewport-based height constraint */
.affiliate {
    max-height: 75vh;
    overflow-y: auto;
}

.affiliate-item .org-details .org-name,
.affiliate-item .org-details .org-email {
    color: #5c636a;
}

/* Footer */
.dropdown-footer {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
}

.footer-action {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
}

    .footer-action .material-symbols-outlined {
        color: grey !important;
    }

/* Username styling - bold and larger */
.app_userName {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
    margin-bottom: 2px;
}

/* Affiliate name styling - smaller text directly below */
.app_affiliateName {
    font-size: 11px;
    font-weight: normal;
    line-height: 1;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Account toggle container adjustments */
.account-toggle {
    padding: 6px 8px;
}

    .account-toggle .user-info.login {
        margin-right: 8px;
    }

.material-symbols-outlined {
    font-size: 24px;
    vertical-align: middle;
    margin-right: 8px;
    margin-left: 8px;
}

.debug-icon {
    color: var(--foo-orange) !important;
    cursor: pointer;
    font-size: 36px !important;
}

    .debug-icon:hover {
        transform: scale(1.1);
        filter: brightness(1.2);
    }



/* Optional: Add a subtle glow effect */
.debug-icon {
    text-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}
/* Active subscription styling */
.affiliate-item.active-subscription {
    background-color: #f0f0f0;
    color: white;
}

.active-subscription .org-icon {
    background-color: var(--foo-blue2) !important;
}

    .active-subscription .org-icon .material-symbols-outlined {
        color: white !important;
    }

.active-subscription .adp-org-icon-gray {
    background-color: var(--info-blue2) !important; /* keep if needed */
}

.active-subscription .org-name {
    color: var(--foo-blue2) !important;
}

.affiliate-item.active-subscription .material-symbols-outlined,
.adp-org-icon-blue {
    color: white;
}

.affiliate-item.active-subscription .material-symbols-outlined,
.adp-org-icon-gray {
    color: white;
}
