/* ============================
   Fonts
============================ */
@import url("https://use.typekit.net/lta0kzp.css");
@import url("https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap");

body,
body * {
  font-family: "Figtree", sans-serif !important;
}

/* ============================
   Feature cards
============================ */
.feature {
  border: 1px solid #DCDEE6;
  border-radius: 8px !important;
}

.beamer_beamer.right {
  width: 560px !important;
}

.feature .category {
  background: #DCDEE6;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #5D6980 !important;
}

/* ============================
   HEADER STRATEGY
============================ */

/* Desktop: hide Beamer default header */
@media (min-width: 561px) {
  body:not(.inapp) .cover.header {
    display: none !important;
  }
}

/* ============================
   Custom desktop header
============================ */
.custom_header {
  height: 90px !important;
  padding: 0 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  background-image: url("https://image.useinsider.com/changelog/insider-header.svg") !important;
  background-repeat: no-repeat !important;
  background-position: top !important;
  background-size: auto;

  border-bottom: 1px solid #000;
}

.custom_logo {
  padding-left: 20px;
}

/* Desktop header link color */
.header a.primary,
.header a:hover,
.header a:active,
.header a.taglink.selected {
  color: #FFFFFF !important;
}

/* ============================
   Sticky nav (desktop only)
============================ */
.nav.streamNav.sticky.sticker {
  visibility: visible;
  margin-top: -130px;
  position: sticky;
  top: 60px;
}

/* ============================
   Stream categories
============================ */
.streamNav li.catItem .catItemName {
  font-weight: bold !important;
  padding-bottom: 4px;
  padding-left: 4px;
  white-space: normal;
}

/* ============================
   Read more button
============================ */
.feature.hasReadmore .featureContent .readmoreButton {
  background: #0A2ECC;
  border-radius: 4px !important;
  color: #FFFFFF !important;
}

/* ============================
   Feature requests hidden
============================ */
.featureRequestsPrompt {
  display: none !important;
}

/* ============================
   Roadmap / Early access
============================ */
.embedRoadmapStream:not(.empty) {
  box-shadow: none !important;
}

.feature.roadmapPost {
  display: flex;
  min-height: 135px;
  padding: 24px;
  margin: 0 auto 24px !important;
}

.roadmapPost .roadmapItemContent {
  padding-top: 0 !important;
  padding-left: 12px !important;
}

.roadmapPost .roadmapItemContent .featureTitle {
  width: 100%;
  font-weight: 600;
  text-decoration: none !important;
  font-size: 15px !important;
  line-height: 24px;
}

.roadmapPost .roadmapItemContent .roadmapStatus {
  display: none;
}

.roadmapPost .roadmapItemContent .featureExcerpt {
  font-size: 15px;
  line-height: 24px;
}

#requestSection span {
  font-size: 0;
}

#requestSection span::before {
  content: "Early access";
  font-size: 12px;
}

/* ============================
   Voting button
============================ */
.roadmapItemScore,
.roadmapItemScoreComment {
  border: 1px solid #0A2ECC;
  border-radius: 4px;
  position: relative;
  height: 64px;
  min-width: 64px;
  max-width: 64px;
}

.roadmapItemScore span {
  font-size: 0;
}

.roadmapItemScore span::before {
  content: "Apply";
  font-size: 15px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0A2ECC;
}

.roadmapItemScore:hover,
.roadmapItemScoreComment:hover {
  background: #0A2ECC;
}

.roadmapItemScore:hover span::before {
  color: #FFFFFF;
}

.roadmapItemScore.voted {
  background: #0A2ECC;
}

.roadmapItemScore.voted span {
  background: #FFFFFF;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.roadmapItemScore.voted span::before {
  content: "";
  display: inline-block;
  transform: rotate(45deg);
  border-bottom: 2px solid #0A2ECC;
  border-right: 2px solid #0A2ECC;
  width: 3px;
  height: 7px;
}

/* ============================
   Cleanup
============================ */
.roadmapItemComments,
.roadmapVoters {
  display: none !important;
}

.standalone.post .container .news {
  padding-top: 105px !important;
}

body.standalone .modeTab {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  width: 310px;
}

body.standalone .modeTab .modeButton {
  width: 100%;
  text-align: center;
  margin-right: 0;
}

.standalone[data-mode="requests"]:not(.post)
.roadmapItemContent .featureContent {
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  overflow: hidden !important;
}

/* ============================
   MOBILE HEADER (FINAL)
============================ */
@media (max-width: 560px) {

  /* Disable custom desktop header */
  .custom_header {
    display: none !important;
  }

  /* Normalize Beamer cover wrappers */
  body:not(.inapp) .cover,
  body:not(.inapp) .coverSpacer,
  body:not(.inapp) .coverInner {
    height: 52px !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Mobile header bar */
  body:not(.inapp) .cover.header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;

    height: 52px !important;
    min-height: 52px !important;
    padding: 0 12px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    background: #0A2ECC !important;
    border-bottom: 1px solid #000 !important;
    background-image: none !important;

    z-index: 99999 !important;
  }

  /* Centered Insider logo */
  body:not(.inapp) .cover.header::before {
    content: "" !important;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 96px;
    height: 24px;

    background-image: url("https://image.useinsider.com/branding/v1/logo/small/white.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    pointer-events: none;
  }

  /* Keep login link visible on the right */
  body:not(.inapp) .cover.header a {
    position: relative;
    z-index: 2;
    color: #FFFFFF !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-decoration: none !important;
  }

  /* Hide Academy on mobile */
  body:not(.inapp) .cover.header a[href*="academy"],
  body:not(.inapp) .cover.header #academy {
    display: none !important;
  }

  /* Correct content offset below fixed header */
  .standalone.post .container .news {
    padding-top: 64px !important;
  }

  /* Neutralize desktop nav offsets */
  .nav.streamNav.sticky.sticker {
    margin-top: 0 !important;
    top: 52px !important;
  }
}