/* Black Friday strip for public pages; same handoff as the workspace banner
   (src/react/features/promo-banner). Public pages are dark, so this is the light variant. */
:root {
  --fbf-height: 43px;
}

.fbf-banner {
  --fbf-bg: #f4f2ef;
  --fbf-ink: #111111;
  --fbf-tag-bg: #222222;
  --fbf-tag-ink: #f4f2ef;
  --fbf-code-border: #282828;
  --fbf-hover: rgb(17 17 17 / 6%);

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050; /* Above the navbar (1000), below the mobile drawer (1090+). */
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: var(--fbf-height);
  padding: 8px 44px 8px 12px;
  background: var(--fbf-bg);
  color: var(--fbf-ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.3;
}

.fbf-banner[hidden] {
  display: none !important;
}

.fbf-banner *,
.fbf-banner *::before,
.fbf-banner *::after {
  box-sizing: border-box;
}

.fbf-content {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-width: 0;
  white-space: nowrap;
}

.fbf-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 144px;
  height: 26px;
  padding: 0 14px;
  background: var(--fbf-tag-bg);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  color: var(--fbf-tag-ink);
  font-size: 12px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.fbf-headline {
  flex: none;
  font-size: 16px;
  font-style: italic;
  font-weight: 700;
}

.fbf-code {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 27px;
  margin: 0;
  padding: 4px 6px;
  border: 1px dashed var(--fbf-code-border);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  cursor: copy;
}

.fbf-code:hover {
  background: var(--fbf-hover);
}

.fbf-code[data-copied] {
  border-style: solid;
}

.fbf-code-label {
  font-weight: 400;
}

.fbf-code-value {
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.fbf-timer,
.fbf-timer-short {
  flex: none;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.fbf-timer-short {
  display: none;
}

.fbf-offer {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.fbf-offer:hover,
.fbf-offer:visited {
  color: inherit;
}

.fbf-offer-text {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fbf-offer:hover .fbf-offer-text {
  text-decoration-thickness: 2px;
}

.fbf-close {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transform: translateY(-50%);
}

.fbf-close:hover {
  background: var(--fbf-hover);
}

.fbf-code:focus-visible,
.fbf-offer:focus-visible,
.fbf-close:focus-visible {
  outline: 2px solid var(--fbf-ink);
  outline-offset: 2px;
}

.fbf-icon {
  flex: none;
  display: block;
}

.fbf-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Page offsets while the strip shows: content starts below it, and the fixed navbar and the
   announcement ticker stack underneath it instead of under the page top. */
body.has-bf-banner {
  padding-top: var(--fbf-height);
}

body.has-bf-banner .navbar {
  top: var(--fbf-height) !important;
}

body.has-bf-banner #formas-announcement-ticker {
  top: var(--fbf-height);
}

body.has-bf-banner.has-ticker .navbar {
  top: calc(var(--fbf-height) + var(--ticker-height, 42px)) !important;
}

@media (max-width: 56em) {
  .fbf-timer {
    display: none;
  }

  .fbf-timer-short {
    display: inline;
  }
}

/* Phones: two rows, as in the workspace banner, so the code and the CTA both stay. */
@media (max-width: 47.99em) {
  :root {
    --fbf-height: 70px;
  }

  .fbf-banner {
    padding-block: 6px;
  }

  .fbf-content {
    flex-wrap: wrap;
    align-content: center;
    gap: 0 8px;
  }

  .fbf-content::after {
    flex-basis: 100%;
    order: 1;
    margin-top: 4px;
    content: '';
  }

  .fbf-tag {
    width: auto;
    font-size: 11px;
    letter-spacing: 1.5px;
  }

  .fbf-code,
  .fbf-timer-short,
  .fbf-offer {
    order: 2;
  }

  .fbf-code-label {
    display: none;
  }
}

@media (max-width: 24em) {
  .fbf-code-icon,
  .fbf-offer .fbf-icon {
    display: none;
  }
}

@media (max-width: 21em) {
  .fbf-content {
    column-gap: 6px;
  }

  .fbf-code,
  .fbf-offer {
    font-size: 12px;
  }

  .fbf-code-value {
    letter-spacing: 0.5px;
  }

  .fbf-timer-short {
    font-size: 11px;
  }
}
