/* Final skincare launcher/advisor correction.
   Keep owner-page layout, copy, pricing and open-widget geometry intact. */

body[data-cosmetics-demo] .cx-launcher {
  gap: 12px !important;
}

/* Closed preview is a real speech bubble, not a pill. */
body[data-cosmetics-demo] .cx-teaser {
  position: relative !important;
  width: min(282px, calc(100vw - 116px)) !important;
  min-height: 76px !important;
  display: block !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1px solid var(--cx-line) !important;
  border-radius: 20px 20px 6px 20px !important;
  background: var(--cx-paper) !important;
  box-shadow: 0 18px 42px -32px color-mix(in srgb, var(--cx-brand) 46%, transparent) !important;
}
body[data-cosmetics-demo] .cx-teaser[hidden] { display: none !important; }
body[data-cosmetics-demo] .cx-teaser::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  right: 26px !important;
  bottom: -8px !important;
  width: 15px !important;
  height: 15px !important;
  border: 0 !important;
  border-right: 1px solid var(--cx-line) !important;
  border-bottom: 1px solid var(--cx-line) !important;
  border-radius: 0 !important;
  background: var(--cx-paper) !important;
  transform: rotate(45deg) !important;
  pointer-events: none !important;
}
body[data-cosmetics-demo] .cx-teaser-open {
  width: 100% !important;
  min-height: 76px !important;
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  padding: 14px 42px 14px 18px !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  color: var(--cx-ink) !important;
  text-align: left !important;
}
body[data-cosmetics-demo] .cx-teaser-open b {
  font-size: 13.8px !important;
  line-height: 1.2 !important;
}
body[data-cosmetics-demo] .cx-teaser-open span {
  color: color-mix(in srgb, var(--cx-ink) 68%, transparent) !important;
  font-size: 11.6px !important;
  line-height: 1.25 !important;
}
body[data-cosmetics-demo] .cx-teaser-close {
  position: absolute !important;
  z-index: 3 !important;
  top: 8px !important;
  right: 8px !important;
  width: 25px !important;
  height: 25px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: color-mix(in srgb, var(--cx-ink) 6%, transparent) !important;
  color: color-mix(in srgb, var(--cx-ink) 64%, transparent) !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}
body[data-cosmetics-demo] .cx-teaser-close:hover {
  background: color-mix(in srgb, var(--cx-ink) 11%, transparent) !important;
  color: var(--cx-ink) !important;
}

/* Launcher is always circular. Raster badge logos are replaced by a clean
   text wordmark in skincare-final-fix.js so a rectangular logo never sits
   inside the circle (SynCare was the clearest failure). */
body[data-cosmetics-demo] .cx-launcher-button,
body[data-cosmetics-demo] .cx-launcher-button.is-image-logo {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  height: 74px !important;
  min-height: 74px !important;
  max-height: 74px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 50% !important;
  background-image: none !important;
  background-color: var(--cx-brand) !important;
  color: #fff !important;
  box-shadow: 0 18px 38px -25px color-mix(in srgb, var(--cx-brand) 68%, transparent) !important;
  transform: none !important;
  transition: background-color .16s ease, transform .16s ease !important;
}
body[data-cosmetics-demo] .cx-launcher-button::before,
body[data-cosmetics-demo] .cx-launcher-button::after {
  content: none !important;
  display: none !important;
}
body[data-cosmetics-demo] .cx-launcher-button .cx-wordmark {
  max-width: 54px !important;
  max-height: 34px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  transform: none !important;
}
body[data-cosmetics-demo] .cx-launcher-label {
  max-width: 58px !important;
  display: block !important;
  overflow-wrap: normal !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  line-height: 1.02 !important;
  letter-spacing: -.025em !important;
  text-align: center !important;
}
body[data-cosmetics-demo] .cx-launcher-label.is-long {
  max-width: 60px !important;
  font-size: 8.7px !important;
  line-height: 1.06 !important;
}
body[data-cosmetics-demo] .cx-launcher-button .cx-logo {
  width: auto !important;
  height: auto !important;
  max-width: 50px !important;
  max-height: 28px !important;
  object-fit: contain !important;
  object-position: center !important;
  filter: brightness(0) invert(1) !important;
}

@media (hover:hover) and (pointer:fine) {
  body[data-cosmetics-demo] .cx-launcher-button:hover,
  body[data-cosmetics-demo] .cx-launcher-button.is-image-logo:hover {
    background-image: none !important;
    background-color: var(--cx-accent) !important;
    transform: translateY(-2px) !important;
  }
  body[data-cosmetics-demo] .cx-launcher-button:hover .cx-wordmark,
  body[data-cosmetics-demo] .cx-launcher-button:hover .cx-launcher-label {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    transform: none !important;
  }
}

/* Barbora Lori: the closed BL launcher starts in the brand ink and visibly
   changes to the green accent on hover. The earlier override painted both
   states green, which is why it looked as if the colour never changed. */
body[data-cosmetics-demo="barboralori"] .cx-widget-head,
body[data-cosmetics-demo="barboralori"] .cx-mode-thumb,
body[data-cosmetics-demo="barboralori"] .cx-message-avatar {
  background-color: var(--cx-accent) !important;
}
body[data-cosmetics-demo="barboralori"] .cx-launcher-button {
  background-color: var(--cx-brand) !important;
}
@media (hover:hover) and (pointer:fine) {
  body[data-cosmetics-demo="barboralori"] .cx-launcher-button:hover {
    background-color: var(--cx-accent) !important;
  }
}
body[data-cosmetics-demo="barboralori"] .cx-barbora-monogram {
  width: 52px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body[data-cosmetics-demo="barboralori"] .cx-barbora-letter {
  position: static !important;
  display: inline-flex !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  transform: none !important;
}
body[data-cosmetics-demo="barboralori"] .cx-barbora-letter::after {
  content: none !important;
}
body[data-cosmetics-demo="barboralori"] .cx-barbora-letter::before {
  display: block !important;
  color: currentColor !important;
  -webkit-text-fill-color: currentColor !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 22px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}
body[data-cosmetics-demo="barboralori"] .cx-barbora-letter--b::before { content: "B" !important; }
body[data-cosmetics-demo="barboralori"] .cx-barbora-letter--l::before { content: "L" !important; }
body[data-cosmetics-demo="barboralori"] .cx-message-avatar .cx-barbora-monogram {
  width: 28px !important;
  height: 28px !important;
}
body[data-cosmetics-demo="barboralori"] .cx-message-avatar .cx-barbora-letter::before {
  font-size: 12px !important;
}

/* All four advisor steps now use images. Product-specific packshots are chosen
   in JS where a brand has them; semantic local imagery is the fallback. */
body[data-cosmetics-demo] .cx-option-photo {
  overflow: hidden !important;
  background: var(--cx-soft) !important;
}
body[data-cosmetics-demo] .cx-option-photo > img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
}

@media (max-width: 760px) {
  body[data-cosmetics-demo] .cx-launcher-button,
  body[data-cosmetics-demo] .cx-launcher-button.is-image-logo {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
  }
}
