/* FCH download banner v2 — server-rendered first paint; dismiss anim only on close */
.fch-download-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 50px;
  min-height: 50px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  box-sizing: border-box;
  background: #101F4D;
  box-shadow: 0 2px 5px rgba(16, 31, 77, 0.35);
  font-family: inherit;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: none;
}

.fch-download-banner.is-hiding {
  transition: transform 0.45s ease-out;
  transform: translateY(-100%);
  pointer-events: none;
}

.fch-download-banner .fch-dl-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 1000px;
  padding-right: 28px;
}

.fch-download-banner .fch-dl-icon {
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border-radius: 8px;
  background: #3568E8;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex: 0 0 36px;
  line-height: 1;
}

.fch-download-banner .fch-dl-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-right: 10px;
  min-width: 0;
}

.fch-download-banner .fch-dl-name {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
  white-space: nowrap;
}

.fch-download-banner .fch-dl-desc {
  margin: 0;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  color: #EAF2FF;
  white-space: nowrap;
  opacity: 0.9;
}

.fch-download-banner .fch-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 15px;
  padding: 8px 15px;
  border-radius: 20px;
  background: #3568E8;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(53, 104, 232, 0.4);
  border: 0;
  cursor: pointer;
  line-height: 1;
}

.fch-download-banner .fch-dl-btn:hover,
.fch-download-banner .fch-dl-btn:focus {
  background: #2f5cd1;
  color: #ffffff !important;
}

.fch-download-banner .fch-dl-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #99a3bd;
  font-size: 18px;
  line-height: 1;
  padding: 10px;
  cursor: pointer;
  z-index: 2;
}

.fch-download-banner .fch-dl-close:hover,
.fch-download-banner .fch-dl-close:focus {
  color: #ffffff;
}

/* Push fixed header + page content when banner is visible */
body.fch-dl-banner-on .site-header {
  top: 50px !important;
}

body.fch-dl-banner-on {
  padding-top: 110px !important; /* 60 header spacer + 50 banner */
}

html.fch-dl-banner-on {
  scroll-padding-top: 114px;
}

/*
 * Mobile v5: match desktop (picture 1) layout —
 * FC + title/subtitle + Join centered as one group; X absolute on the right.
 */
@media (max-width: 900px) {
  .fch-download-banner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 36px 0 10px !important; /* room for absolute X */
    box-sizing: border-box !important;
    overflow: hidden !important;
    box-shadow: none !important;
  }

  .fch-download-banner .fch-dl-content {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    gap: 0 !important;
  }

  .fch-download-banner .fch-dl-icon {
    flex: 0 0 auto !important;
    align-self: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .fch-download-banner .fch-dl-info {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    align-self: center !important;
    text-align: left !important;
    min-width: 0 !important;
    flex: 0 1 auto !important; /* do NOT grow — keep cluster tight like desktop */
    margin: 0 10px 0 0 !important;
    padding: 0 !important;
  }

  .fch-download-banner .fch-dl-name,
  .fch-download-banner .fch-dl-desc {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .fch-download-banner .fch-dl-btn {
    flex: 0 0 auto !important;
    align-self: center !important;
    margin: 0 0 0 0 !important;
    box-sizing: border-box !important;
  }

  .fch-download-banner .fch-dl-close {
    position: absolute !important;
    top: 50% !important;
    right: 4px !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    flex: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
  }
}

/* Existing compact sizes for very small phones — dimensions unchanged */
@media (max-width: 480px) {
  .fch-download-banner .fch-dl-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    margin-right: 8px;
    font-size: 11px;
  }

  .fch-download-banner .fch-dl-info {
    margin-right: 5px;
  }

  .fch-download-banner .fch-dl-name {
    font-size: 12px;
  }

  .fch-download-banner .fch-dl-desc {
    font-size: 9px;
  }

  .fch-download-banner .fch-dl-btn {
    font-size: 10px;
    padding: 5px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fch-download-banner.is-hiding {
    transition: none;
  }
}
