/* Скоро Пицца · режимы доступа v5.41.1 */
.platform-mode-switch {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(227, 25, 55, .22);
  border-radius: 999px;
  color: #a3122a;
  background: #fff4f6;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.platform-mode-switch:hover { color: #fff; background: var(--brand-red); }
.platform-mode-switch__icon { font-size: 14px; line-height: 1; }

.topbar { column-gap: clamp(14px, 1.6vw, 28px); }
.main-nav { min-width: 0; justify-content: center; gap: clamp(13px, 1.3vw, 25px); }
.account { min-width: 0; }
.platform-mode-switch:focus-visible,
.avatar:focus-visible { outline: 3px solid rgba(37, 108, 205, .35); outline-offset: 2px; }

.profile-menu { width: 320px; }
.profile-menu__head {
  position: relative;
  isolation: isolate;
  min-height: 92px;
  color: #fff;
  border-bottom: 0;
  background: linear-gradient(110deg, rgba(126, 8, 29, .94), rgba(227, 25, 55, .9)), url("./images/pattern-1.png") center / 330px auto repeat;
}
.profile-menu__head::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(61, 5, 15, .18), transparent 70%);
}
.profile-menu__head small { color: rgba(255, 255, 255, .76); }
.profile-menu__head .avatar { outline: 3px solid rgba(255, 255, 255, .3); }
.profile-menu__section { padding: 7px; border-top: 1px solid var(--line); }
.profile-menu__head + .profile-menu__section { border-top: 0; }
.profile-menu__section > a,
.profile-menu__mode {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: #4f555e;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.profile-menu__section > a > span:first-child,
.profile-menu__mode > span:first-child {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #8b6600;
  background: #fff5cf;
  font-size: 13px;
}
.profile-menu__section > a:hover,
.profile-menu__mode:hover { color: #2e3035; background: #f5f6f7; }
.profile-menu__section--logout > a { color: #a3122a; }
.profile-menu__section--logout > a > span:first-child { color: #a3122a; background: #fff0f2; }
#profile-admin-section { background: #fffaf0; }
#profile-admin-section .profile-menu__mode { color: #6d5208; font-weight: 800; }

.admin-context {
  color: #fff;
  background: linear-gradient(100deg, #7f0a21, #b90f2b 58%, #d91b38);
  box-shadow: 0 8px 26px rgba(92, 10, 27, .14);
}
.admin-context__inner {
  display: grid;
  width: min(1160px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}
.admin-context__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 10px;
  color: #5c4300;
  background: var(--brand-yellow);
  font-size: 13px;
  font-weight: 900;
}
.admin-context__inner strong,
.admin-context__inner small { display: block; }
.admin-context__inner strong { font-size: 13px; }
.admin-context__inner small { margin-top: 3px; color: rgba(255, 255, 255, .72); font-size: 10px; }
.admin-context__exit {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.admin-context__exit:hover { color: #5c4300; background: var(--brand-yellow); }

body[data-platform-mode="admin"] .topbar {
  border-top-color: var(--brand-red);
  background: rgba(255, 252, 247, .98);
}
body[data-platform-mode="admin"] main { padding-top: 20px; }
body[data-platform-mode="admin"] .nav-link.is-active { color: #9d1027; }
body[data-platform-mode="admin"] .nav-link.is-active::after { background: var(--brand-red); }

@media (max-width: 1680px) {
  .platform-mode-switch--top .platform-mode-switch__label { display: none; }
  .platform-mode-switch--top { width: 38px; flex: 0 0 38px; padding: 0; }
  .main-nav { gap: 14px; }
  .nav-link { font-size: 13px; }
  .account__copy strong, .account__copy small { max-width: 150px; }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr auto; min-height: 118px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; min-height: 46px; justify-content: center; }
}

@media (max-width: 1240px) {
  .platform-mode-switch--top .platform-mode-switch__label { display: none; }
  .platform-mode-switch--top { width: 36px; padding: 0; }
  .main-nav { gap: 17px; }
}

@media (max-width: 820px) {
  .platform-mode-switch--top { position: static; right: auto; }
  .account__copy { display: none; }
  .profile-menu { position: fixed; top: 68px; right: 12px; left: 12px; width: auto; max-height: calc(100vh - 90px); overflow-y: auto; }
  .admin-context__inner { width: min(100% - 28px, 1160px); min-height: 72px; grid-template-columns: auto minmax(0, 1fr); }
  .admin-context__inner small { line-height: 1.35; }
  .admin-context__exit { display: none; }
  body[data-platform-mode="admin"] .mobile-nav { justify-content: flex-start; overflow-x: auto; overscroll-behavior-inline: contain; }
  body[data-platform-mode="admin"] .mobile-nav a { min-width: 86px; flex: 0 0 auto; }
}

/* Меню профиля всегда находится выше содержимого и шапок разделов. */
.topbar { z-index: 1000; }
.profile-menu { z-index: 1100; }

@media (max-width: 720px) {
  .topbar { position: relative; z-index: 1000; }
}
