/* ============================================================
   Fusion Reformer – Side Banner
   Styled to match Semplice 7 site design:
     Primary:    #002835  (dark teal)
     Accent:     #1396C2  (cyan)
     Background: #F2F1F0  (cream)
     Body font:  'Syne' (Google, wght 400) — paragraphs
     UI font:    'Outfit' (Google, wght 500–600) — labels, buttons
   Both fonts are loaded globally by the theme.
   ============================================================ */

#fr-banner {
  --fr-panel-w: 300px;
  --fr-tab-w: 40px;
  position: fixed;
  right: 0;
  top: 50%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  z-index: 9999;
  /* Collapsed: panel slides off-screen, only the tab remains visible */
  transform: translateY(-50%) translateX(var(--fr-panel-w));
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 85vh;
}

#fr-banner.fr-banner--open {
  transform: translateY(-50%) translateX(0);
}

/* ── Tab (always visible) ───────────────────────────────── */

.fr-banner__tab {
  width: var(--fr-tab-w);
  flex-shrink: 0;
  background-color: #002835;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px 0 0 8px;
  box-shadow: -3px 0 20px rgba(0, 40, 53, 0.22);
  transition: background-color 0.2s;
}

.fr-banner__tab:hover,
.fr-banner__tab:focus-visible {
  background-color: #073742;
  outline: none;
}

.fr-banner__tab-text {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #F2F1F0;
  font-family: 'Syne', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: nowrap;
  padding: 16px 0;
  user-select: none;
  pointer-events: none;
}

/* ── Panel ──────────────────────────────────────────────── */

.fr-banner__panel {
  width: var(--fr-panel-w);
  background-color: #F2F1F0;
  padding: 48px 22px 36px;
  box-shadow: -4px 0 32px rgba(0, 40, 53, 0.14);
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  position: relative;
}

.fr-banner__close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #002835;
  opacity: 0.45;
  border-radius: 4px;
  transition: opacity 0.15s, background-color 0.15s;
  line-height: 1;
  padding: 0;
}

.fr-banner__close:hover,
.fr-banner__close:focus-visible {
  opacity: 1;
  background-color: rgba(0, 40, 53, 0.08);
  outline: none;
}

.fr-banner__heading {
  font-family: 'Outfit', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
  color: #002835;
  margin: 0;
}

.fr-banner__text {
  font-family: 'Syne', sans-serif;
  font-weight: 400;
  font-size: 0.889rem;
  line-height: 1.5;
  color: #002835;
  margin: 0;
}

.fr-banner__cta {
  display: block;
  background-color: #2fa8c7;
  color: #ffffff !important;
  font-family: 'Syne', sans-serif;
  font-size: 0.889rem;
  font-weight: 500;
  text-decoration: none !important;
  padding: 11px 20px;
  border-radius: 34px;
  text-align: center;
  transition: background-color 0.2s;
  flex-shrink: 0;
  margin-top: 4px;
  letter-spacing: 0.01em;
}

.fr-banner__cta:hover {
  background-color: #0496bf;
}

/* ── Mobile & Tablet: bottom slide-up ───────────────────── */

@media (max-width: 768px) {
  #fr-banner {
    --fr-tab-h: 42px;
    right: 0;
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: 85vh;
    flex-direction: column;
    transform: translateY(calc(100% - var(--fr-tab-h)));
    /* Let clicks pass through the container where the tab doesn't cover */
    pointer-events: none;
  }

  #fr-banner.fr-banner--open {
    transform: translateY(0);
  }

  .fr-banner__tab {
    height: var(--fr-tab-h);
    flex-shrink: 0;
    border-radius: 12px 12px 0 0;
    box-shadow: none;
    align-self: center;
    pointer-events: auto;
  }

  .fr-banner__tab-text {
    writing-mode: horizontal-tb;
    transform: none;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    padding: 0 16px;
  }

  .fr-banner__panel {
    width: 100%;
    box-shadow: 0 -6px 28px rgba(0, 40, 53, 0.14);
    border-radius: 0;
    pointer-events: auto;
  }
}

/* Tablet: tab at 50% width, centered */
@media (min-width: 481px) and (max-width: 768px) {
  .fr-banner__tab {
    width: 50%;
  }
}

/* Mobile: tab with gap on both sides */
@media (max-width: 480px) {
  .fr-banner__tab {
    width: calc(100% - 48px);
  }
}
