/*
  Home topbar tweaks module.
  Extracted from the former modules/40-rails-bases-home.css; keep after 44-home-viewport-shell.css.
*/

/*
 * Custom tweaks for the base carousel and chat layout.
 *
 * These styles improve readability of the РІР‚СљР вЂР В°Р В·РЎвЂ№ Р СР ВµРЎРѓРЎРЏРЎвЂ Р В°РІР‚Сњ rail by giving
 * more consistent spacing, multiРІР‚вЂline truncation for titles and a
 * subtle badge for ranks.  They also ensure that the webchat history
 * takes up all available space inside the panel on large screens so
 * the composer stays anchored at the bottom without the entire panel
 * scrolling.
 */

/* Base rail meta layout: moved to the main rail section above.
   Keep only the badge positioning here (used by both real slides and skeletons). */
/* Rank badge in the base rail */
.railScroller--bases .railBadge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.headerRadioMini.is-offline{
  background:
    radial-gradient(circle at top right, rgba(132,146,166,.16), rgba(132,146,166,0) 48%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.headerRadioMini.is-offline .headerRadioMini__badge{
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.08);
  color: rgba(231,237,243,.88);
}
.headerRadioMini.is-offline .headerRadioMini__liveDot{
  background: rgba(176,186,198,.88);
  box-shadow: none;
  animation: none;
}
.headerRadioMini.is-offline .headerRadioMini__play{
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
  border-color: rgba(255,255,255,.12);
}
.headerRadioMini.is-offline .headerRadioMini__wave span{
  opacity: .20;
  transform: scaleY(.35);
}

@media (min-width: 981px) {
  body.page-home .topbar{
    --topline-box-h: 118px;
  }
  body.page-home .topline{
    gap: 10px;
    padding: 8px var(--page-pad-x) 9px;
  }
  body.page-home .brand,
  body.page-home .headerRailBases,
  body.page-home .headerRailPromo,
  body.page-home .profileWidget{
    height: var(--topline-box-h);
    min-height: 0;
  }
  body.page-home .brand{
    width: 104px;
    min-width: 104px;
  }
  body.page-home .headerRailBases{
    background:
      linear-gradient(180deg, rgba(15,16,21,.78), rgba(11,12,16,.60)),
      rgba(0,0,0,.25);
    box-shadow: 0 18px 34px rgba(0,0,0,.20);
  }
  body.page-home .headerRailPromo,
  body.page-home .profileWidget,
  body.page-home .brand{
    background:
      linear-gradient(180deg, rgba(12,13,18,.68), rgba(9,10,14,.54)),
      rgba(0,0,0,.25);
  }
  body.page-home .headerRailBasesShell{
    grid-template-columns: clamp(226px, 27%, 248px) minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
  }
  body.page-home .headerRadioMini,
  body.page-home .headerRailBasesStage{
    min-height: 0;
  }
  body.page-home .headerRailBasesStage{
    position: relative;
    margin-left: 8px;
  }
  body.page-home .headerRailBasesStage::before{
    content: "";
    position: absolute;
    left: -8px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.11), rgba(255,255,255,0));
    pointer-events: none;
  }
  body.page-home .headerRadioMini{
    padding: 9px 10px;
    gap: 6px;
    border-radius: 15px;
    background:
      radial-gradient(circle at top right, rgba(240,140,40,.18), rgba(240,140,40,0) 48%),
      linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  }
  body.page-home .headerRadioMini__top{
    min-height: 18px;
  }
  body.page-home .headerRadioMini__main{
    gap: 10px;
    align-items: center;
  }
  body.page-home .headerRadioMini__title{
    font-size: 12px;
    line-height: 1.22;
    -webkit-line-clamp: 2;
  }
  body.page-home .headerRadioMini__eyebrow{
    font-size: 9px;
    letter-spacing: .12em;
  }
  body.page-home .headerRadioMini__owner{
    gap: 7px;
  }
  body.page-home .headerRadioMini__ownerAvatar{
    width: 20px;
    height: 20px;
  }
  body.page-home .headerRadioMini__ownerName{
    font-size: 10px;
    line-height: 1.15;
  }
  body.page-home .headerRadioMini__wave{
    height: 12px;
    gap: 3px;
  }
  body.page-home .headerRadioMini__actions{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  body.page-home .headerRadioMini__status{
    margin-top: auto;
    line-height: 1.22;
    font-size: 10px;
    color: rgba(231,237,243,.66);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  body.page-home .headerRadioMini__badge{
    padding: 3px 7px;
    font-size: 9px;
  }
  body.page-home .headerRadioMini__listeners{
    font-size: 10px;
  }
  body.page-home .headerRadioMini__play{
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 14px;
  }
  body.page-home .headerRadioMini__vote,
  body.page-home .headerRadioMini__open{
    min-height: 25px;
    padding: 4px 7px;
    font-size: 10px;
    gap: 5px;
    width: 100%;
    justify-content: center;
  }
  body.page-home .headerRailPromo .railBody{
    height: 100%;
  }
  body.page-home .railScroller--promo .promoOverlay{
    left: 16px;
    right: 16px;
    bottom: 14px;
  }
  body.page-home .railScroller--promo .promoTitle{
    font-size: 14px;
    max-width: 24ch;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railSlide{
    min-height: 0;
    height: 100%;
    padding: 9px 10px;
    gap: 10px;
    border-radius: 15px;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .baseCover{
    width: clamp(88px, 23%, 108px);
    height: 70px;
    border-radius: 12px;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .baseInfo{
    justify-content: center;
    gap: 5px;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railTitle{
    font-size: 12px;
    line-height: 1.2;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railSub{
    font-size: 10px;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .baseCounts{
    gap: 5px 9px;
    font-size: 10px;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railSlide--empty{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    align-content: center;
    gap: 10px 12px;
    padding: 12px 14px;
    background:
      radial-gradient(140% 140% at 0% 0%, rgba(240,140,40,.08), rgba(240,140,40,0) 52%),
      rgba(255,255,255,.035);
    border-style: solid;
    border-color: rgba(255,255,255,.12);
    flex-basis: min(100%, 470px);
    max-width: min(100%, 470px);
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railSlide--empty .emptySlide__icon{
    grid-row: 1 / span 2;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    font-size: 16px;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railSlide--empty .emptySlide__title,
  body.page-home .headerRailBasesStage .railScroller--bases .railSlide--empty .emptySlide__hint{
    grid-column: 2;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railSlide--empty .emptySlide__title{
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
  }
  body.page-home .headerRailBasesStage .railScroller--bases .railSlide--empty .emptySlide__hint{
    font-size: 11px;
    line-height: 1.35;
    max-width: 38ch;
    color: rgba(231,237,243,.72);
  }
  body.page-home .profileWidget{
    padding: 8px 10px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }
  body.page-home .profileAvatarLarge{
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  body.page-home .profileWidgetBody{
    gap: 4px;
    justify-content: space-between;
    height: 100%;
  }
  body.page-home .profileWidgetName{
    font-size: 13px;
  }
  body.page-home .profileWidgetSteamId{
    font-size: 10px;
  }
  body.page-home .profileWidgetMetrics{
    gap: 5px;
  }
  body.page-home .profileWidgetMetrics .metric,
  body.page-home .profileWidgetMetrics > .notifBell > .notifBellBtn{
    min-height: 20px;
    padding: 2px 6px;
    font-size: 10px;
  }
  body.page-home .profileWidgetActions{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    margin-top: 0;
  }
  body.page-home .profileWidgetActions > .btn,
  body.page-home .profileWidgetActions > a.btn,
  body.page-home .profileWidgetActions > .notifBell > .notifBellBtn{
    width: 100%;
    min-width: 0;
    min-height: 25px;
    padding: 4px 6px;
    font-size: 10px;
    justify-content: center;
  }
}

@media (min-width: 1360px) {
  body.page-home .topbar{
    --topline-box-h: 120px;
  }
  body.page-home .topline{
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) minmax(306px, 326px);
    gap: 12px;
    align-items: stretch;
  }
  body.page-home .topCenter{
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(276px, .80fr);
    gap: 12px;
    min-width: 0;
    margin-left: 0;
  }
  body.page-home .topRight{
    margin-left: 0;
    min-width: 0;
    width: auto;
  }
  body.page-home .brand{
    width: 104px;
    min-width: 104px;
  }
  body.page-home .headerRailPromo{
    max-width: none;
  }
  body.page-home .profileWidgetHeaderRow{
    align-items: start;
  }
}
