/**
 * B2B Demo Shell — Shared Overrides
 *
 * Import this file in every demo page for consistent widget behavior.
 * Prevents structural drift. See docs/B2B_DEMO_SHELL_SPEC.md.
 *
 * Phase 2: Bottle-forward hero, lighter secondary cards, small footer links,
 * premium light-theme feel.
 */

/* ——— Results refinement: Match Hero first, bottle-forward, lighter secondary ——— */
#bbw-widget .bbw-results-inner {
  display: block;
  width: 100%;
}
#bbw-widget .bbw-profile-summary .bbw-taste-passport-eyebrow {
  color: inherit;
  opacity: 0.85;
}
#bbw-widget .bbw-results-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}
#bbw-widget .bbw-results-footer .bbw-taste-passport {
  margin-bottom: 0;
}

/* ——— Hero: bottle panel anchors right column ——— */
#bbw-widget .bbw-featured-hero-content {
  display: flex;
  flex-direction: column;
}
#bbw-widget .bbw-featured-hero-bottle-panel {
  width: 140px;
  height: 180px;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

/* ——— Card spacing: tighter secondary cards (2–3 per viewport) ——— */
#bbw-widget .bbw-featured-hero {
  margin-bottom: 2.5rem !important;
  transform: none !important;
}
#bbw-widget .bbw-more-ways {
  margin-top: 2rem !important;
  margin-bottom: 0.75rem !important;
}
#bbw-widget .bbw-card {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
  position: relative !important;
  left: 0 !important;
  transform: none !important;
  clear: both !important;
  overflow: visible !important;
  isolation: isolate !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}
#bbw-widget .bbw-card:first-of-type {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}
/* Secondary cards: editorial list rows, tighter spacing, one action only */
#bbw-widget .bbw-card.bbw-card-secondary {
  padding: 0.6rem 0 !important;
  border: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
#bbw-widget .bbw-card.bbw-card-secondary:hover {
  box-shadow: none !important;
}
#bbw-widget .bbw-card.bbw-card-secondary .bbw-view-recipe {
  margin-top: 0.35rem;
  font-size: 0.78rem;
}
/* Neutralize card-media negative margins that cause overlap */
#bbw-widget .bbw-card .bbw-card-media {
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0.76rem !important;
}

/* ——— Footer: remove giant bars, keep only small links ——— */
#bbw-widget .bbw-results-actions {
  display: none !important;
}
#bbw-widget .bbw-taste-passport-actions-minimal {
  margin-top: 0.45rem !important;
  gap: 0.2rem 0.4rem !important;
}
#bbw-widget .bbw-taste-passport-link,
#bbw-widget .bbw-passport-retake,
#bbw-widget .bbw-passport-explore,
#bbw-widget .bbw-next-to-explore-link {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  min-height: auto !important;
  line-height: 1.4 !important;
  width: auto !important;
  display: inline !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}
/* ——— Next to explore: standardized typography, spacing, links, separator ——— */
#bbw-widget .bbw-next-to-explore,
#bbw-widget .bbw-next-to-explore-inline {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 0.15rem 0.25rem !important;
  margin-bottom: 1.25rem !important;
}
#bbw-widget .bbw-next-to-explore-text {
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}
#bbw-widget .bbw-next-to-explore-sep {
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  color: rgba(0, 0, 0, 0.4) !important;
  margin: 0 0.1rem !important;
}
#bbw-widget .bbw-next-to-explore-link,
#bbw-widget .bbw-next-to-explore-link-adventurous {
  font-size: 0.78rem !important;
  font-weight: 500 !important;
}
#bbw-widget .bbw-taste-passport-support {
  display: none;
}

/* ——— Hero: balance cocktail image, bottle anchor, standardized spacing ——— */
#bbw-widget .bbw-featured-hero-media {
  max-height: 240px !important;
  border-radius: 10px !important;
}
#bbw-widget .bbw-hero-cta-tertiary-wrap {
  margin-top: 0.5rem;
}
#bbw-widget .bbw-cta-tertiary-wrap .bbw-hero-cta-tertiary {
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.55);
}
#bbw-widget .bbw-cta-tertiary-wrap .bbw-hero-cta-tertiary:hover {
  color: inherit;
}

/* ——— Premium editorial feel: lighter card frames, avoid dashboard look ——— */
#bbw-widget .bbw-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}
#bbw-widget .bbw-card:hover {
  border-color: rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}
#bbw-widget .bbw-results-footer {
  padding-top: 1.25rem !important;
}

/* Credibility layer — inherits card color; demos with dark themes override explicitly */
#bbw-widget .bbw-credibility-layer {
  margin-top: 0.6rem;
}
/* Recipe collapsed by default — widget already does this; ensure no override expands it */
#bbw-widget .bbw-recipe-steps {
  display: none !important;
}
#bbw-widget .bbw-recipe-steps.bbw-open {
  display: block !important;
}

/* ——— Standard footer lead CTA (use with .footer .lead-cta) ——— */
.footer .lead-cta {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
}
.footer .lead-cta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer .demo-links {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
}
.footer .demo-links .demo-disabled {
  color: var(--brand-muted, #94a3b8);
  cursor: default;
  text-decoration: none;
}
.footer .admin-link {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* ——— Widget title: de-emphasize (section label, not page headline) ——— */
.widget-wrap .widget-title {
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  color: var(--brand-muted, #6b7280) !important;
  margin: 0 0 1.25rem !important;
  letter-spacing: 0.02em;
}

/* ——— Explore section: reduce visual dominance, reinforce optional ——— */
.bottles h2 {
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  color: var(--brand-muted, #6b7280) !important;
}
.bottles-subtext {
  font-size: 0.85rem !important;
  color: var(--brand-muted, #6b7280) !important;
  opacity: 0.9;
  margin: -0.5rem 0 1.25rem !important;
  font-style: italic;
}
.bottles-grid {
  gap: 1.25rem !important;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)) !important;
}
.bottle-card .bottle-img {
  min-height: 165px !important;
  padding: 0.65rem !important;
  opacity: 0.92;
}
.bottle-card .bottle-body {
  padding: 0.85rem !important;
}
.bottle-card h3 {
  font-size: 0.94rem !important;
}
.bottle-card p {
  font-size: 0.8rem !important;
}
.bottle-card:hover {
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: none !important;
}
.bottle-card:hover .bottle-img {
  opacity: 0.97;
}
.bottle-card a {
  font-weight: 500 !important;
  opacity: 0.9;
}
.bottle-card a:hover {
  opacity: 1;
}

/* ——— Broken bottle image fallback (featured bottles shelf) ——— */
.bottle-card img[src=""],
.bottle-card img:not([src]) {
  visibility: hidden;
}
