/* LAYOUT */

.profile-selector-row {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
}

.profile-switcher-dropdown-label {
    margin: 0 0 6px;
    font-size: 1.2rem;
    color: #8d8d97;
}

/* TRIGGER (collapsed state) */

dropdown-picker.profile-switcher-dropdown {
    position: relative;
    display: block;
    flex: 1;
}

dropdown-picker.profile-switcher-dropdown dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 8px 12px;

    background: #fff;
    border: 1px solid #d8dce5;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);

    cursor: pointer;
    transition: all .25s ease;
}

dropdown-picker.profile-switcher-dropdown dropdown-header:hover {
    border-color: #6d5bd0;
    box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

/* Arrow is generated content, not a real DOM node - a real node would
   count toward dropdown-header's textContent and permanently disable
   DropdownPicker's ability to write the selected profile's name in. */
dropdown-picker.profile-switcher-dropdown dropdown-header::after {
    content: "▼";
    color: #6d5bd0;
    flex-shrink: 0;
    transition: transform .25s ease;
}

dropdown-picker.profile-switcher-dropdown[open] dropdown-header::after {
    transform: rotate(180deg);
}

dropdown-picker.profile-switcher-dropdown dropdown-header choice-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

dropdown-picker.profile-switcher-dropdown dropdown-header .dropdown-avatar {
    width: 34px;
    height: 34px;
    border: 2px solid #ececf6;
}

dropdown-picker.profile-switcher-dropdown dropdown-header .dropdown-name {
    font-size: 1.4rem;
    font-weight: 600;
    color: #242424;
}

/* OPEN PANEL */

dropdown-picker.profile-switcher-dropdown [data-option-list] {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 100%;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;

    z-index: 100;
    overflow: hidden;

    background: #fff;
    border: 1px solid #ececf2;
    border-radius: 14px;
    box-shadow: 0 22px 45px rgba(0,0,0,.14);
}

dropdown-picker.profile-switcher-dropdown[open] [data-option-list] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* EACH PROFILE ROW - "selected" is set automatically by DropdownPicker's
   own render(), we never toggle it ourselves. */

dropdown-picker.profile-switcher-dropdown [data-option-list] choice-option {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 14px;
    cursor: pointer;
    position: relative;
    transition: background .2s ease;
}

dropdown-picker.profile-switcher-dropdown [data-option-list] .dropdown-avatar {
    width: 48px;
    height: 48px;
}

dropdown-picker.profile-switcher-dropdown [data-option-list] choice-option:hover {
    background: #f8f8ff;
}

dropdown-picker.profile-switcher-dropdown [data-option-list] choice-option[selected] {
    background: #f4f1ff;
}

dropdown-picker.profile-switcher-dropdown [data-option-list] choice-option[selected]::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background: #6d5bd0;
    border-radius: 0 6px 6px 0;
}

/* Un-comment to bring back an explicit checkmark instead of relying
   only on the accent bar above:
dropdown-picker.profile-switcher-dropdown [data-option-list] choice-option[selected]::after {
    content: "✓";
    margin-left: auto;
    width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    background: #6d5bd0; color: #fff; border-radius: 50%;
}
*/

/* Shared by header clone and list rows */

dropdown-picker.profile-switcher-dropdown .dropdown-avatar {
    border-radius: 50%;
    object-fit: cover;
}

dropdown-picker.profile-switcher-dropdown .dropdown-content {
    display: flex;
    flex-direction: column;
}

dropdown-picker.profile-switcher-dropdown .dropdown-name {
    font-weight: 600;
    color: #2f2f38;
}

/* MOBILE */

@media (max-width:700px) {

    .profile-selector-row {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-action-btn {
        width: 100%;
    }

}