/* Authorized visitor navigation: desktop bar and compact user sheet. */
#sub-header.pn-authorized-menu-section {
  margin-bottom: 10px;
  padding: 10px 0;
  background: #fff;
}

.pn-authorized-menu {
  box-sizing: border-box;
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  gap: 4px;
  padding: 5px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fafbfb;
  font-family: "Manrope", "Inter", Arial, Helvetica, sans-serif;
}

.pn-authorized-menu__item {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 10px;
  color: #16202e;
  font-size: 14px;
  font-weight: 600;
  line-height: 28px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.pn-authorized-menu__item:hover,
.pn-authorized-menu__item:focus {
  background: #e9f1fc;
  color: #1f5fa8;
  text-decoration: none;
  outline: 0;
}

.pn-authorized-menu__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pn-authorized-menu__icon {
  position: relative;
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 15px;
  line-height: 1;
}

#sub-header.pn-authorized-menu-section .pn-authorized-menu__icon > i {
  width: auto;
  color: inherit !important;
  font-size: inherit;
  line-height: 1;
}

#sub-header.pn-authorized-menu-section .pn-authorized-menu__icon > i::after {
  display: none;
  content: none;
}

.pn-authorized-menu__item--add .pn-authorized-menu__icon {
  background: #fdf0ec;
  color: #e2683c;
}

.pn-authorized-menu__item--forecasts .pn-authorized-menu__icon {
  background: #ecf5ee;
  color: #2f7a3f;
}

.pn-authorized-menu__item--feed .pn-authorized-menu__icon {
  background: #fdf3e8;
  color: #f08a3c;
  font-size: 14px;
}

.pn-authorized-menu__item--tournaments .pn-authorized-menu__icon {
  background: #fdf6e6;
  color: #d9962a;
}

.pn-authorized-menu__item--statistic .pn-authorized-menu__icon {
  background: #eef4fc;
  color: #2f7ed8;
  font-size: 14px;
}

.pn-authorized-menu__icon .dot-notification {
  position: absolute;
  top: -2px;
  right: -2px;
  bottom: auto;
  left: auto;
  margin: 0;
  box-shadow: 0 0 0 2px #fafbfb;
}

/* Desktop avatar dropdown keeps its compact list presentation. */
.pn-user-menu__item--mobile-only,
.pn-user-menu__divider--mobile-only {
  display: none;
}

.pn-user-menu__divider {
  height: 1px;
  margin: 5px 8px !important;
  background: #eef0f3;
}

.pn-user-panel .pn-user-menu__item > a {
  cursor: pointer;
}

.pn-user-menu__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  color: #727984;
}

.pn-user-panel .pn-user-menu__icon > i {
  width: auto;
  color: inherit;
  font-size: 14px;
  text-align: center;
}

.pn-user-menu__label {
  min-width: 0;
}

.pn-user-menu__item--logout > a,
.pn-user-menu__item--logout .pn-user-menu__icon {
  color: #b34c48;
}

@media (max-width: 1379px) {
  #sub-header.pn-authorized-menu-section {
    display: none !important;
  }

  body.pn-account-panel-open {
    overflow: hidden;
  }

  .pn-user-panel {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1702;
    display: flex;
    visibility: hidden;
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    max-height: 88dvh;
    margin: 0 auto;
    padding: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e1e6ec;
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
    background: #fff;
    box-shadow: 0 -20px 55px -24px rgba(16, 24, 40, .42);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 20px));
    animation: none;
    transition: visibility 0s linear .26s, transform .26s cubic-bezier(.22, 1, .36, 1), opacity .18s ease;
  }

  .pn-user-panel::before {
    display: none;
  }

  .pn-user-panel.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .pn-account-backdrop {
    position: fixed;
    z-index: 1701;
    display: block;
    inset: 0;
    border: 0;
    background: rgba(16, 20, 26, .48);
    opacity: 0;
    pointer-events: none;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    transition: opacity .18s ease;
  }

  .pn-account-center.has-open-user-panel .pn-account-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .pn-user-panel .pn-sheet-handle {
    display: flex;
    width: 100%;
    height: 24px;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .pn-user-panel .pn-sheet-handle > span {
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: #ccd2d9;
  }

  .pn-user-panel-mobile-head {
    display: flex;
    min-height: 58px;
    flex: 0 0 58px;
    align-items: center;
    gap: 11px;
    padding: 0 14px 0 16px;
    border-bottom: 1px solid #eef1f4;
  }

  .pn-user-panel-mobile-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid #e1e5ea;
    border-radius: 50%;
    object-fit: cover;
  }

  .pn-user-panel-mobile-head > strong {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    color: #171b22;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .pn-user-panel-mobile-head .pn-panel-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    font-size: 24px;
  }

  .pn-user-panel .pn-user-menu {
    display: grid;
    min-height: 0;
    margin: 0;
    padding: 10px 14px calc(16px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .pn-user-menu__item,
  .pn-user-menu__item--mobile-only {
    display: block;
    min-width: 0;
    margin: 0;
  }

  .pn-user-menu__item--wide,
  .pn-user-menu__item--notification,
  .pn-user-menu__divider {
    grid-column: 1 / -1;
  }

  .pn-user-menu__divider,
  .pn-user-menu__divider--mobile-only {
    display: block;
    width: 100%;
    height: 1px;
    margin: 3px 0 !important;
    background: #e8edf2;
  }

  .pn-user-panel .pn-user-menu__item > a {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 66px;
    height: 100%;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid #dfe6ee;
    border-radius: 15px;
    background: #f9fafc;
    color: #202a38;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
  }

  .pn-user-panel .pn-user-menu__item > a:hover,
  .pn-user-panel .pn-user-menu__item > a:focus {
    border-color: #cbd9e8;
    background: #f4f8fc;
    color: #172334;
    text-decoration: none;
    box-shadow: 0 6px 18px -14px rgba(29, 68, 105, .6);
    outline: 0;
  }

  .pn-user-panel .pn-user-menu__item > a:active {
    transform: scale(.985);
  }

  .pn-user-panel .pn-user-menu__item:not(.pn-user-menu__item--wide):not(.pn-user-menu__item--notification) > a {
    gap: 8px;
    padding-right: 9px;
    padding-left: 9px;
    font-size: 13px;
  }

  .pn-user-panel .pn-user-menu__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 16px;
  }

  .pn-user-panel .pn-user-menu__item:not(.pn-user-menu__item--wide):not(.pn-user-menu__item--notification) .pn-user-menu__icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .pn-user-panel .pn-user-menu__icon > i {
    width: auto;
    color: inherit;
    font-size: inherit;
    line-height: 1;
  }

  .pn-user-panel .pn-user-menu__label {
    display: block;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .pn-user-menu__icon--add {
    background: #fdf0ec;
    color: #e2683c;
  }

  .pn-user-menu__icon--forecasts {
    background: #ecf5ee;
    color: #2f7a3f;
  }

  .pn-user-menu__icon--tournaments {
    background: #fdf6e6;
    color: #d9962a;
  }

  .pn-user-menu__icon--statistic {
    background: #eef4fc;
    color: #2f7ed8;
  }

  .pn-user-menu__icon--feed {
    background: #fdf3e8;
    color: #f08a3c;
  }

  .pn-user-menu__icon--account {
    background: #f0f2f5;
    color: #647282;
  }

  .pn-user-menu__icon--message {
    background: #edf5fb;
    color: #347cae;
  }

  .pn-user-menu__icon--notification {
    background: #f6effb;
    color: #8558ad;
  }

  .pn-user-menu__icon--review {
    background: #eef7f4;
    color: #39806c;
  }

  .pn-user-menu__icon--answer {
    background: #f1f3fa;
    color: #6574a6;
  }

  .pn-user-menu__item--logout > a {
    background: #fffafa;
    color: #b34c48;
  }

  .pn-user-menu__icon--logout {
    background: #fbedeb;
    color: #b34c48;
  }

  .pn-user-panel .pn-menu-count {
    position: absolute;
    top: 7px;
    right: 7px;
    min-width: 20px;
    height: 20px;
    margin: 0;
    line-height: 20px;
    box-shadow: 0 0 0 2px #f9fafc;
  }

  .pn-user-menu__status {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d8473e;
    box-shadow: 0 0 0 3px #fff;
  }
}

@media (min-width: 1380px) {
  #sub-header.pn-authorized-menu-section {
    display: block;
  }
}

@media (max-width: 359px) {
  .pn-user-panel .pn-user-menu {
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .pn-user-panel .pn-user-menu__item > a {
    min-height: 62px;
    gap: 8px;
    padding: 8px;
    font-size: 13px;
  }

  .pn-user-panel .pn-user-menu__icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pn-authorized-menu__item,
  .pn-user-panel,
  .pn-account-backdrop,
  .pn-user-panel .pn-user-menu__item > a {
    transition: none !important;
  }
}
