/* Единый сдержанный стиль для T454-шапки. */
@import url("./gmt-header-upgrade.css");

:root {
  --gmt-nav-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  --gmt-nav-line: #dfe7f1;
  --gmt-nav-accent: #1a4a85;
  --gmt-nav-text: #1d2c43;
  --gmt-nav-link-bg: #eef4fd;
  --gmt-header-max-width: 1220px;
  --gmt-header-side-padding: 24px;
  --gmt-header-brand-size: 34px;
  --gmt-header-link-size: 16px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#allrecords,
.t-records {
  max-width: 100%;
}

/* Prevent flash of legacy per-page header titles before unified header JS replaces them. */
.t454 .t454__logo:not(.gmt-header-brand-node),
.marketplace-nav .marketplace-nav__brand:not(.gmt-header-brand-node),
.marketplace-nav .marketplace-nav__title:not(.gmt-header-brand-node),
.legal-header .legal-brand:not(.gmt-header-brand-node) {
  position: relative;
  color: transparent !important;
  font-size: 0 !important;
  text-shadow: none !important;
}

.t454 .t454__logo:not(.gmt-header-brand-node)::before,
.marketplace-nav .marketplace-nav__brand:not(.gmt-header-brand-node)::before,
.marketplace-nav .marketplace-nav__title:not(.gmt-header-brand-node)::before,
.legal-header .legal-brand:not(.gmt-header-brand-node)::before {
  content: "ГМТ ТРЕЙД";
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding-left: 46px;
  background: url("../images/logo/LogoKub.svg") left center / 34px 34px no-repeat;
  color: #1d2c43;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

@media (max-width: 980px) {
  .t454 .t454__logo:not(.gmt-header-brand-node)::before,
  .marketplace-nav .marketplace-nav__brand:not(.gmt-header-brand-node)::before,
  .marketplace-nav .marketplace-nav__title:not(.gmt-header-brand-node)::before,
  .legal-header .legal-brand:not(.gmt-header-brand-node)::before {
    font-size: 18px;
    font-weight: 700;
    min-height: 24px;
    padding-left: 32px;
    background-size: 24px 24px;
  }
}

.tmenu-mobile .tmenu-mobile__burgerlogo__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tmenu-mobile .tmenu-mobile__burgerlogo:not(.gmt-header-brand-node) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.tmenu-mobile .tmenu-mobile__burgerlogo:not(.gmt-header-brand-node)::before {
  content: "ГМТ ТРЕЙД";
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding-left: 32px;
  background: url("../images/logo/LogoKub.svg") left center / 24px 24px no-repeat;
  color: #1d2c43;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.tmenu-mobile .tmenu-mobile__burgerlogo:not(.gmt-header-brand-node) > a,
.tmenu-mobile .tmenu-mobile__burgerlogo:not(.gmt-header-brand-node) .tmenu-mobile__burgerlogo__title {
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.tmenu-mobile .tmenu-mobile__burgerlogo:not(.gmt-header-brand-node) img {
  opacity: 0 !important;
}

.tmenu-mobile .tmenu-mobile__burgerlogo__title::before {
  content: "";
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background: url("../images/logo/LogoKub.svg") center center / contain no-repeat;
}

@media (min-width: 981px) {
  .t454 {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid var(--gmt-nav-line);
    box-shadow: var(--gmt-nav-shadow);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .t454__maincontainer {
    max-width: var(--gmt-header-max-width);
    margin: 0 auto;
    padding: 0 var(--gmt-header-side-padding);
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    height: 100% !important;
  }

  .t454__logowrapper {
    position: static;
    left: auto;
    transform: none;
    width: auto;
    height: auto;
    padding: 0;
    justify-self: center;
    display: block;
  }

  .t454__logowrapper2 {
    display: block;
    position: static;
  }

  .t454__logo {
    display: block;
    font-size: var(--gmt-header-brand-size) !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    color: var(--gmt-nav-text) !important;
    max-width: min(42vw, 390px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .t454__leftwrapper,
  .t454__rightwrapper {
    position: static;
    width: auto;
    height: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
    text-align: initial !important;
  }

  .t454__leftwrapper {
    justify-self: start;
  }

  .t454__rightwrapper {
    justify-self: end;
  }

  .t454__leftmenuwrapper,
  .t454__rightmenuwrapper {
    display: block;
    height: auto;
  }

  .t454__leftmenuwrapper .t454__list,
  .t454__rightmenuwrapper .t454__list {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .t454__list {
    list-style: none;
    margin: 0;
    padding: 0 !important;
  }

  .t454__list_item {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0;
  }

  .t454__list_item a.t-menu__link-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    color: var(--gmt-nav-text) !important;
    text-decoration: none;
    font-weight: 500;
    font-size: var(--gmt-header-link-size) !important;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .t454__list_item a.t-menu__link-item:hover,
  .t454__list_item a.t-menu__link-item:focus-visible,
  .t454__list_item a.t-menu__link-item.t-active {
    color: var(--gmt-nav-accent) !important;
    background: var(--gmt-nav-link-bg);
  }

  .t454__list_item a.t-menu__link-item::after {
    display: none !important;
  }

  .t454__linewrapper {
    display: none;
  }
}

@media (min-width: 981px) and (max-width: 1320px) {
  .t454__maincontainer {
    padding: 0 20px;
    column-gap: 10px;
  }

  .t454__logo {
    font-size: 30px !important;
  }

  .t454__list_item a.t-menu__link-item {
    padding: 0 10px;
  }
}

@media (min-width: 981px) and (max-width: 1140px) {
  .t454__logo {
    font-size: 26px !important;
    max-width: min(36vw, 320px);
  }

  .t454__list_item a.t-menu__link-item {
    min-height: 38px;
    padding: 0 8px;
  }
}

.tmenu-mobile {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid #e4ebf4;
}

@media (max-width: 980px) {
  .tmenu-mobile__container {
    gap: 10px;
    min-width: 0;
  }

  .tmenu-mobile__burgerlogo {
    max-width: calc(100% - 56px);
    min-width: 0;
  }

  .tmenu-mobile__burgerlogo__title {
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .t454__maincontainer {
    padding: 0 16px;
    box-sizing: border-box;
    max-width: 100%;
  }

  .t454__leftwrapper,
  .t454__rightwrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .t454__list {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}


