/* User menu appearance shared with the PortalClientes header. */
body.site-layout .header .ot-header-user {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: min(420px, 100%);
    height: 48px;
    padding: 0;
    background: #fff;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
}

body.site-layout .header #UserMenu > .k-item > .k-link::before {
    content: "";
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    background: center / 24px 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E");
}

body.site-layout .header #UserMenu {
    align-self: stretch;
    flex: 1 1 auto;
    min-width: 0;
    font-family: inherit;
    border: 0;
    background: transparent;
}

body.site-layout .header #UserMenu > .k-item {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0;
    background: transparent;
}

body.site-layout .header #UserMenu > .k-item > .k-link {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0 16px;
    margin: 0 !important;
    font-family: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    background: transparent !important;
    cursor: pointer !important;
}

body.site-layout .header #UserMenu > .k-item > .k-link > .k-menu-link-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.site-layout .header #UserMenu > .k-item > .k-link > .k-menu-expand-arrow {
    position: static;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-left: 15px;
    color: #979797;
    transition: transform 0.2s ease;
}

/* Reset the old auto margins that pushed the informational rows to the right. */
body.site-layout .header #UserMenu .k-menu-group .user-menu {
    padding: 0;
    text-align: left;
}

body.site-layout .header #UserMenu .k-menu-group .user-menu > .k-link {
    width: 100%;
    justify-content: flex-start;
    padding: 7px 16px;
    margin: 0 !important;
    font-family: inherit;
    font-size: 16px;
    line-height: 24px;
    text-align: left;
    white-space: normal;
}

body.site-layout .header #UserMenu .k-menu-group .k-menu-link-text {
    display: block;
    text-align: left;
    overflow-wrap: anywhere;
}

/* Kendo gives its animation wrappers an inline width based on the email.
   Size the whole popup from the trigger instead. */
body.site-layout .header #UserMenu > .k-item > .k-animation-container {
    width: calc(100% + 4px) !important;
    margin-left: -2px;
}

body.site-layout .header #UserMenu .k-child-animation-container,
body.site-layout .header #UserMenu .k-menu-popup,
body.site-layout .header #UserMenu .k-menu-group {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
}

body.site-layout .header #UserMenu .k-menu-popup {
    margin-top: 6px;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

body.site-layout .header #UserMenu .k-menu-group {
    padding: 0;
}

body.site-layout .header #UserMenu .k-menu-group .k-separator {
    margin: 0;
    border-color: #e7e7e7;
}

body.site-layout .header #UserMenu .k-menu-group .ot-user-email > .k-link {
    padding: 16px 18px;
    font-weight: 600;
    color: #082b47 !important;
}

body.site-layout .header #UserMenu .ot-user-roles-title,
body.site-layout .header #UserMenu .ot-user-role {
    background: #f6f7f9;
}

body.site-layout .header #UserMenu .ot-user-roles-title {
    opacity: 1;
}

body.site-layout .header #UserMenu .k-menu-group .ot-user-roles-title > .k-link {
    padding: 12px 18px 6px;
    font-size: 13px;
    line-height: 20px;
    color: #7b8795 !important;
    background: #f6f7f9 !important;
}

body.site-layout .header #UserMenu .k-menu-group .ot-user-role > .k-link {
    gap: 12px;
    padding: 8px 18px;
    color: #48566b !important;
    background: #f6f7f9 !important;
}

body.site-layout .header #UserMenu .ot-user-role + .k-separator {
    margin-top: 0;
}

body.site-layout .header #UserMenu .ot-user-role:has(+ .k-separator) > .k-link {
    padding-bottom: 16px;
}

body.site-layout .header #UserMenu .k-menu-group .ot-user-role > .k-link::before,
body.site-layout .header #UserMenu .k-menu-group .ot-user-logout > .k-link::before {
    content: "";
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}

body.site-layout .header #UserMenu .ot-user-role-admin > .k-link::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818b98' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3 7v5c0 5 9 9 9 9s9-4 9-9V7z'/%3E%3Cpath d='m8 12 3 3 5-5'/%3E%3C/svg%3E");
}

body.site-layout .header #UserMenu .ot-user-role-person > .k-link::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818b98' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E");
}

body.site-layout .header #UserMenu .ot-user-role-billing > .k-link::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818b98' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h14v18l-3-2-4 2-4-2-3 2zM8 7h8M8 11h8M8 15h5'/%3E%3C/svg%3E");
}

body.site-layout .header #UserMenu .k-menu-group .ot-user-logout > .k-link {
    gap: 12px;
    padding: 14px 18px;
    font-weight: 400 !important;
    color: #082b47 !important;
}

body.site-layout .header #UserMenu .k-menu-group .ot-user-logout > .k-link::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23818b98' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4H4v16h5M9 12h12m-5-5 5 5-5 5'/%3E%3C/svg%3E");
}

body.site-layout .header #UserMenu .k-menu-group .ot-user-logout > .k-link:hover,
body.site-layout .header #UserMenu .k-menu-group .ot-user-logout > .k-link:focus {
    background: #edf4fc !important;
}

body.site-layout .header #UserMenu > .k-item[aria-expanded="true"] > .k-link > .k-menu-expand-arrow {
    transform: rotate(180deg);
}

body.site-layout .header .ot-header-user:focus-within {
    border-color: #979797;
}

@media (max-width: 575px) {
    body.site-layout .header .ot-header-user {
        max-width: 100%;
        margin-top: 8px;
    }
}
