/* One presentation for the account menu and every submenu, including polled rows. */
#profilPanel .panelBox {
    /* Keep the content-box panel and its padding inside the viewport. */
    max-height:calc(100dvh - 7.5rem);
    padding-top:.75rem;
    padding-bottom:.75rem;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
}
#profilPanel .panelBox > .row {min-width:0;}
#profilPanel .panelPageTitle {
    margin:0 0 .25rem;
    min-height:32px;
    font-size:1rem;
    font-weight:600;
    line-height:1.4;
}
#profilPanel .panelBox h4 {
    margin-left:0;
    font-size:.8rem;
    font-weight:400;
    line-height:1.4;
    color:var(--sub-text);
    overflow-wrap:anywhere;
}
#profilPanel .panelHeaderActions button,
#profilPanel #overview .textContainer.date button {
    box-sizing:border-box;
    flex:0 0 32px;
    width:32px;
    min-width:32px;
    height:32px;
    padding:0;
    border-radius:50%;
    margin:0;
}
#profilPanel .panelHeaderActions .material-icons,
#profilPanel #overview .textContainer.date .material-icons {font-size:18px;}
#profilPanel #overview .profileHead.small .textContainer h3 {font-size:1rem;line-height:1.35;}
#profilPanel #overview .profileHead.small .textContainer p {font-size:.8rem;line-height:1.4;}
#profilPanel #overview img.profilePicture.lg {width:44px;height:44px;}
#profilPanel #overview img.avatarBorder.lg {width:54px;height:54px;}
/* These spacing utilities are important in spacing.css; keep density local. */
#profilPanel #overview hr.my-3 {margin-top:.5rem!important;margin-bottom:.5rem!important;}
#profilPanel .listElements.mt-3 {margin-top:.5rem!important;}
#profilPanel .panelSocialLinks {gap:.5rem;}
#profilPanel .panelSocialLinks a {width:32px;height:32px;}
#profilPanel .panelSocialLinks .socialIcon {width:24px;height:24px;}

/* The same hit area, typography and focus treatment for links and logout. */
#profilPanel nav.list ul {margin:0;padding:0;}
#profilPanel nav.list li {margin:0;padding:0;}
#profilPanel nav.list li > a,
#profilPanel nav.list .navigationAction {
    display:flex;
    align-items:center;
    gap:.5rem;
    box-sizing:border-box;
    width:100%;
    min-height:36px;
    margin:0;
    padding:.2rem .5rem;
    border:0;
    border-radius:.5rem;
    font-size:.85rem;
    font-weight:500;
    line-height:1.35;
    text-align:left;
    overflow-wrap:anywhere;
    color:var(--text);
    background:transparent;
}
#profilPanel nav.list li :is(a,.navigationAction) > i {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 26px;
    box-sizing:border-box;
    width:26px;
    height:26px;
    padding:0;
    margin:0!important; /* Reset the legacy logout icon's important margin. */
    font-size:18px;
}
#profilPanel nav.list li > a > .material-icons.floatRight {
    float:none;
    flex-shrink:0;
    margin-left:auto;
    padding:0;
    font-size:18px;
    color:var(--sub-text);
}
#profilPanel nav.list .panel-menu-badge {flex-shrink:0;box-sizing:border-box;min-width:20px;width:auto;margin-left:auto;padding:0 .3rem;border-radius:1rem;}
#profilPanel nav.list .panel-menu-badge + .material-icons.floatRight {margin-left:0;}

/* Neutral rows share their geometry; only unread content gets an accent rail. */
#profilPanel .listElements {
    margin:.5rem 0 0;
    padding:0;
    list-style:none;
    max-height:min(20rem,50dvh);
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
}
#profilPanel .listElements > li {
    box-sizing:border-box;
    min-width:0;
    margin:0;
    padding:0;
    border:0;
    border-left:3px solid transparent;
    border-bottom:1px solid var(--border);
    background:transparent;
    color:var(--text);
}
#profilPanel .listElements > li:last-child {border-bottom:0;}
#profilPanel #notifications-list > li:not(.seen):not([data-empty]),
#profilPanel #progress-rewards-list > li[data-reward-id]:not(.seen),
#profilPanel #panel-message-chat-list > li.unseen {border-left-color:var(--text-red);}
#profilPanel .listElements > li > a,
#profilPanel .listElements > li > .listElementText {
    display:flex;
    align-items:center;
    box-sizing:border-box;
    min-width:0;
    min-height:44px;
    width:100%;
    margin:0;
    padding:.375rem .625rem;
    border:0;
    border-radius:.5rem;
    color:var(--text);
    transition:background-color .2s ease,color .2s ease;
}
#profilPanel .listElements .profileHead.small {
    flex:1;
    justify-content:flex-start;
    gap:.5rem;
    min-width:0;
}
#profilPanel .listElements .profileHead.small > .profile {flex:0 0 32px;}
#profilPanel .listElements img.profilePicture {display:block;box-sizing:border-box;width:32px;height:32px;}
#profilPanel .listElements img.avatarBorder {width:36px;height:36px;top:-2px;left:-2px;}
#profilPanel .listElements .supportChatIcon {width:32px;height:32px;min-width:32px;min-height:32px;}
#profilPanel .listElements .supportChatIcon .material-icons {font-size:20px;}
#profilPanel .listElements .profileHead.small .profilePicture > .material-icons {
    display:flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    font-size:20px;
    color:var(--text-red);
}
#profilPanel .listElements .textContainer {flex:1;min-width:0;}
#profilPanel .listElements p {
    display:block;
    flex:1;
    min-width:0;
    margin:0;
    font-size:.85rem;
    font-weight:500;
    line-height:1.35;
    overflow-wrap:anywhere;
    color:var(--text);
}
#profilPanel .listElements p .small {
    display:block;
    margin:.125rem 0 0;
    font-size:.75rem;
    font-weight:400;
    line-height:1.4;
    color:var(--sub-text);
}
#profilPanel .listElements .textContainer p + p {
    margin-top:.125rem!important; /* Reward names carry the mt-1 utility. */
    font-size:.75rem;
    color:var(--sub-text);
}
#profilPanel .listElements > li > a:is(:hover,:focus-visible),
#profilPanel nav.list li > a:is(:hover,:focus-visible),
#profilPanel nav.list .navigationAction:is(:hover,:focus-visible) {background:var(--bg);color:var(--text-red);}
#profilPanel .listElements > li > a:focus-visible,
#profilPanel nav.list li > a:focus-visible,
#profilPanel nav.list .navigationAction:focus-visible {outline:2px solid var(--text-red);outline-offset:-2px;}
#profilPanel .listElements > li > a:is(:hover,:focus-visible) p {color:var(--text-red);}
#profilPanel nav.list .material-icons,
#profilPanel .listElements .material-icons {transition:color .2s ease;}
#profilPanel nav.list li > a:is(:hover,:focus-visible) .material-icons,
#profilPanel nav.list .navigationAction:is(:hover,:focus-visible) .material-icons,
#profilPanel .listElements > li > a:is(:hover,:focus-visible) .material-icons {color:var(--text-red);}
#profilPanel .levelProgress .progressBar {box-sizing:border-box;}
#profilPanel .panelReadAllActions {margin:.75rem 0 0;gap:.5rem;}

/* Invitation feedback and controls form one compact flow inside the submenu. */
#profilPanel #invitefriends .panelInviteIntro {margin:.4rem 0 .75rem;font-size:.8rem;line-height:1.45;color:var(--sub-text);}
#profilPanel #invitefriends .panelInviteContent {display:grid;gap:.75rem;min-width:0;}
#profilPanel #invitefriends .panelInviteFeedback {padding-bottom:.6rem;border-bottom:1px solid var(--border);}
#profilPanel #invitefriends .panelInviteStatusRow {display:flex;flex-wrap:wrap;align-items:center;gap:.3rem .65rem;}
#profilPanel #invitefriends-status {flex:1 1 12rem;min-width:0;}
#profilPanel #invitefriends .invite-status {margin:0;padding:0;border:0;border-radius:0;background:transparent;font-size:.8rem;line-height:1.45;color:var(--sub-text);}
#profilPanel #invitefriends .invite-status--error {color:var(--text-red);}
#profilPanel #invitefriends .invite-status--success {color:var(--text);}
#profilPanel #invitefriends .invite-status__small {margin:.2rem 0 0;font-size:.75rem;line-height:1.4;color:var(--sub-text);opacity:1;}
#profilPanel #invitefriends-capacity:not(.invisible) {margin-top:.4rem;}
#profilPanel .panelInviteContent button {display:inline-flex;align-items:center;justify-content:center;gap:.35rem;box-sizing:border-box;min-height:40px;max-width:100%;margin:0;padding:.45rem .7rem;font-size:.8rem;line-height:1.3;}
#profilPanel .panelInviteContent button .material-icons {flex-shrink:0;margin:0;font-size:18px;}
#profilPanel #invitefriends .panelInviteRetry {flex:0 0 auto;min-height:32px;margin-left:auto;padding:.2rem 0;border:0;border-radius:.25rem;background:transparent;color:var(--sub-text);font-size:.75rem;}
#profilPanel #invitefriends .panelInviteRetry:hover {outline:none;color:var(--text-red);}
#profilPanel #invitefriends-form {gap:.4rem;}
#profilPanel #invitefriends .panelInviteLabel {display:block;margin:0;font-size:.8rem;font-weight:500;line-height:1.4;color:var(--text);}
#profilPanel #invitefriends .panelInviteEmailRow,
#profilPanel #invitefriends .invitefriends-link-row {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:.4rem;min-width:0;}
#profilPanel #invitefriends :is(#invitefriends-email,#invitefriends-link-input) {box-sizing:border-box;width:100%;min-width:0;min-height:40px;margin:0;padding:.5rem .65rem;border:1px solid var(--border);border-radius:.5rem;background:var(--bg);color:var(--text);font-family:inherit;font-size:.875rem;line-height:1.4;}
#profilPanel #invitefriends-submit {align-self:stretch;}
#profilPanel #invitefriends .panelInviteAge {display:grid;grid-template-columns:16px minmax(0,1fr);align-items:start;gap:.5rem;margin-top:.15rem;}
#profilPanel #invitefriends-age-confirmation {width:16px;height:16px;margin:.15rem 0 0;accent-color:var(--text-red);}
#profilPanel #invitefriends .panelInviteAge label {display:block;margin:0;font-size:.75rem;font-weight:500;line-height:1.45;cursor:pointer;}
#profilPanel #invitefriends-age-hint {margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--sub-text);}
#profilPanel #invitefriends-link {display:grid;gap:.4rem;min-width:0;}
#profilPanel #invitefriends #invitefriends-revoke-btn {min-height:32px;padding:.3rem .6rem;font-size:.75rem;}
#profilPanel #invitefriends :is(button,input):focus-visible {outline:2px solid var(--text-red);outline-offset:2px;}
@media(max-width:1023px) {
    #profilPanel .panelBox {max-height:calc(100dvh - 2.5rem);}
}
@media(pointer:coarse) {
    #profilPanel nav.list li > a,
    #profilPanel nav.list .navigationAction {min-height:44px;}
    #profilPanel .panelHeaderActions button,
    #profilPanel #overview .textContainer.date button {flex-basis:44px;width:44px;min-width:44px;height:44px;}
    #profilPanel .panelSocialLinks a {width:44px;height:44px;}
    #profilPanel #invitefriends .panelInviteContent button {min-height:44px;}
    #profilPanel #invitefriends #invitefriends-revoke-btn {min-height:44px;}
    #profilPanel #invitefriends :is(#invitefriends-email,#invitefriends-link-input) {min-height:44px;font-size:16px;}
}
