/* Themes gallery (block "gallery-birthdaybanner") */

.bb-gallery { position: relative; }

.bb-gallery-hero {
  background: var(--bb-gradient-180);
  padding: 56px 64px 64px;
}
.bb-gallery-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.bb-gallery-eyebrow {
  margin: 0 0 8px;
  font-family: var(--bb-font-heading);
  font-size: 11px;
  font-weight: 600;
  color: var(--bb-blue);
  text-transform: uppercase;
  letter-spacing: .18em;
}
.bb-gallery-hero-inner > .bb-gallery-eyebrow {
  margin: 0;
  color: #0B0B0E;
}
.bb-gallery-hero-inner h1 {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--bb-white);
  text-shadow: 0 4px 20px rgba(0, 0, 0, .3);
}
.bb-gallery-hero-sub {
  margin: 0;
  max-width: 640px;
  font-family: var(--bb-font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.bb-gallery-search-box {
  background: var(--bb-white);
  border: 1.5px solid rgba(0, 0, 0, .12);
  border-radius: var(--bb-radius-card);
  padding: 22px 24px;
  box-shadow: var(--sh-card);
  width: 100%;
  box-sizing: border-box;
}
.bb-gallery-search-field { position: relative; display: flex; align-items: center; }
.bb-gallery-search-field svg { position: absolute; left: 16px; opacity: .8; pointer-events: none; }
.bb-gallery-search-field input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bb-white);
  border: 1.5px solid rgba(0, 0, 0, .18);
  border-radius: 14px;
  padding: 14px 40px 14px 42px;
  font-family: var(--bb-font-body);
  font-size: 14px;
  color: var(--bb-ink);
}
.bb-gallery-search-clear {
  position: absolute;
  right: 10px;
  width: 24px; height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .1);
  color: var(--bb-ink);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}
.bb-gallery-search-clear.is-visible { display: flex; }

.bb-gallery-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 64px 96px;
  display: flex;
  align-items: flex-start;
  gap: 36px;
}

.bb-gallery-rail {
  width: 236px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  background: var(--bb-white);
  border: 1.5px solid rgba(0, 0, 0, .12);
  border-radius: var(--bb-radius-card);
  padding: 22px 18px;
  box-shadow: var(--sh-card);
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}
.bb-gallery-rail-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 22px; }
.bb-gallery-rail-btn {
  text-align: left;
  background: var(--bb-white);
  border: 1.5px solid rgba(0, 0, 0, .1);
  border-radius: 12px;
  padding: 11px 14px;
  font-family: var(--bb-font-heading);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--bb-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color .18s var(--bb-ease), border-color .18s var(--bb-ease), color .18s var(--bb-ease);
}
.bb-gallery-rail-btn:hover { border-color: var(--bb-blue); }
.bb-gallery-rail-btn.is-active {
  background: var(--bb-blue-15);
  border-color: var(--bb-blue);
  color: var(--bb-blue);
}
.bb-gallery-rail-count { font-size: 10.5px; font-weight: 700; color: var(--bb-muted); }
.bb-gallery-rail-btn.is-active .bb-gallery-rail-count { color: var(--bb-blue); opacity: .75; }

.bb-gallery-promo {
  display: block;
  background: var(--bb-gradient-135);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
  text-decoration: none !important;
}
/* .bb-scope a:hover (birthdaybanner.css) would otherwise draw an underline
   across this whole card on hover — its child text already sets its own
   color, so only text-decoration needs guarding here. */
.bb-gallery-promo:hover { text-decoration: none !important; }
.bb-gallery-promo-heading { margin: 0 0 4px; font-size: 13px; font-weight: 800; color: #fff; line-height: 1.3; }
.bb-gallery-promo-text { margin: 0 0 12px; font-size: 11px; color: rgba(255, 255, 255, .85); font-family: var(--bb-font-body); line-height: 1.55; }
.bb-gallery-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bb-white);
  border-radius: var(--bb-radius-pill);
  padding: 9px 16px;
  font-family: var(--bb-font-heading);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--bb-ink);
}

.bb-gallery-main { flex: 1; min-width: 320px; }
.bb-gallery-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 14px; flex-wrap: wrap; }
.bb-gallery-head h2 { margin: 0 0 4px; font-size: 20px; font-weight: 800; color: var(--bb-ink); }
.bb-gallery-result-label { margin: 0; font-size: 13px; color: var(--bb-body); font-family: var(--bb-font-body); }

.bb-gallery-empty {
  border-radius: var(--bb-radius-card);
  background: var(--bb-surface);
  border: 1.5px dashed rgba(0, 0, 0, .18);
  padding: 56px 32px;
  text-align: center;
}
.bb-gallery-empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.bb-gallery-empty-icon svg {
  display: inline-flex;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, .18);
  background: var(--bb-white);
  padding: 14px;
  box-sizing: border-box;
}
.bb-gallery-empty-title { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--bb-ink); }
.bb-gallery-empty-text { margin: 0 0 20px; font-size: 13px; color: var(--bb-body); font-family: var(--bb-font-body); }
.bb-gallery-empty-btn {
  background: var(--bb-gradient-135);
  border: none;
  border-radius: var(--bb-radius-pill);
  padding: 11px 24px;
  font-family: var(--bb-font-heading);
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}

.bb-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.bb-gallery-card {
  border-radius: var(--bb-radius-card);
  background: var(--bb-white);
  border: 1.5px solid rgba(0, 0, 0, .1);
  overflow: hidden;
  box-shadow: var(--sh-card);
  transition: transform .22s var(--bb-ease), box-shadow .22s var(--bb-ease);
}
.bb-gallery-card:hover { transform: translateY(-4px); box-shadow: var(--sh-card-hi); }

.bb-gallery-card-preview {
  position: relative;
  min-height: 168px;
  background: var(--bb-gradient-135);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 30px 16px 16px;
  text-align: center;
  overflow: hidden;
}
.bb-gallery-card-icon { font-size: 20px; line-height: 1; }
.bb-gallery-card-headline {
  margin: 0;
  font-family: var(--bb-font-heading);
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  line-height: 1.25;
  text-wrap: balance;
}
.bb-gallery-card-tagline {
  margin: 0;
  font-family: var(--bb-font-body);
  font-size: 10px;
  color: rgba(255, 255, 255, .78);
}
.bb-gallery-card-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--bb-radius-pill);
  padding: 3px 10px;
  font-family: var(--bb-font-heading);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .08em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bb-gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 0, 20, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s var(--bb-ease);
}
.bb-gallery-card:hover .bb-gallery-card-overlay { opacity: 1; }
.bb-gallery-card-overlay-btn {
  background: var(--bb-white);
  border-radius: var(--bb-radius-pill);
  padding: 10px 22px;
  font-family: var(--bb-font-heading);
  font-size: 12px;
  font-weight: 700;
  /* .bb-scope a (birthdaybanner.css) is (0,1,1) specificity, one tick above a
     single class here, and its bundle stylesheet loads AFTER this block's —
     confirmed by rendering /themes/ locally (link text rendered brand-blue
     instead of ink). !important is the same fix birthdaybanner.css already
     uses for sf-process-steps/sf-faq overrides, for the same reason. */
  color: var(--bb-ink) !important;
  text-decoration: none !important;
}
.bb-gallery-card-overlay-btn:hover { text-decoration: none !important; }

.bb-gallery-card-body { padding: 14px 16px 16px; }
.bb-gallery-card-name {
  margin: 0 0 4px;
  font-family: var(--bb-font-heading);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--bb-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bb-gallery-card-sub {
  margin: 0 0 12px;
  font-family: var(--bb-font-body);
  font-size: 12.5px;
  color: var(--bb-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bb-gallery-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--bb-font-body);
  font-size: 11px;
  color: var(--bb-blue);
  font-weight: 600;
  margin-bottom: 12px;
}
.bb-gallery-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bb-gradient-135);
  /* !important: see .bb-gallery-card-overlay-btn comment above. */
  color: #fff !important;
  text-decoration: none !important;
  border-radius: var(--bb-radius-pill);
  padding: 11px 16px;
  font-family: var(--bb-font-heading);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(79, 130, 195, .28);
}
.bb-gallery-card-cta:hover { filter: brightness(1.06); color: #fff !important; text-decoration: none !important; }
.bb-gallery-card-cta:active { transform: scale(.98); }

@media (max-width: 1240px) {
  .bb-gallery-hero { padding: 48px 40px 56px; }
  .bb-gallery-shell { padding-left: 40px; padding-right: 40px; }
}

@media (max-width: 900px) {
  .bb-gallery-hero { padding: 40px 28px 48px; }
  .bb-gallery-shell { flex-direction: column; padding: 28px 28px 64px; gap: 22px; }
  .bb-gallery-rail {
    width: 100%;
    position: static;
    max-height: none;
    overflow-y: visible;
  }
  .bb-gallery-rail-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .bb-gallery-hero { padding: 32px 24px 40px; }
  .bb-gallery-shell { padding: 24px 24px 48px; }
}

@media (max-width: 620px) {
  .bb-gallery-hero { padding: 28px 18px 36px; }
  .bb-gallery-shell { padding: 20px 18px 40px; }
  .bb-gallery-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}
