.sti-ai-root,
.sti-ai-root * {
  box-sizing: border-box;
}

.sti-ai-root {
  --sti-black: #151515;
  --sti-gold: #b99355;
  --sti-cream: #f8f5ef;
  --sti-border: rgba(21, 21, 21, 0.12);
  --sti-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--sti-black);
}

.sti-ai-launcher {
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--sti-black);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.sti-ai-launcher:hover {
  transform: translateY(-1px);
}

.sti-ai-launcher__icon {
  color: var(--sti-gold);
  font-size: 22px;
}

.sti-ai-panel {
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100vh - 110px));
  position: absolute;
  right: 0;
  bottom: 72px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  overflow: hidden;
  border: 1px solid var(--sti-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--sti-shadow);
}

.sti-ai-panel[hidden] {
  display: none;
}

.sti-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  background:
    radial-gradient(circle at top right, rgba(185, 147, 85, 0.22), transparent 42%),
    var(--sti-black);
  color: #fff;
}

.sti-ai-header__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sti-ai-header__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.sti-ai-header__subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.sti-ai-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.sti-ai-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 16px;
  background:
    linear-gradient(rgba(248, 245, 239, 0.78), rgba(255, 255, 255, 0.96));
}

.sti-ai-message {
  display: flex;
  margin: 0 0 12px;
}

.sti-ai-message--user {
  justify-content: flex-end;
}

.sti-ai-message__bubble {
  max-width: 86%;
  border-radius: 17px;
  padding: 11px 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.48;
}

.sti-ai-message--assistant .sti-ai-message__bubble {
  border: 1px solid var(--sti-border);
  border-bottom-left-radius: 5px;
  background: #fff;
}

.sti-ai-message--user .sti-ai-message__bubble {
  border-bottom-right-radius: 5px;
  background: var(--sti-black);
  color: #fff;
}

.sti-ai-message--thinking .sti-ai-message__bubble {
  opacity: 0.62;
  font-style: italic;
}

.sti-ai-products {
  display: grid;
  gap: 9px;
  margin: 3px 0 15px;
}

.sti-ai-product {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border: 1px solid var(--sti-border);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.sti-ai-product:hover {
  border-color: rgba(185, 147, 85, 0.75);
}

.sti-ai-product__image {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--sti-cream);
}

.sti-ai-product__details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sti-ai-product__title {
  overflow: hidden;
  color: var(--sti-black);
  font-size: 13px;
  line-height: 1.35;
}

.sti-ai-product__price {
  color: #6c6254;
  font-size: 12px;
}

.sti-ai-quick-questions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 13px 5px;
  background: #fff;
}

.sti-ai-quick-questions[hidden] {
  display: none;
}

.sti-ai-quick-question {
  flex: 0 0 auto;
  border: 1px solid var(--sti-border);
  border-radius: 999px;
  padding: 8px 11px;
  background: var(--sti-cream);
  color: var(--sti-black);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.sti-ai-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 11px;
  border-top: 1px solid var(--sti-border);
  background: #fff;
}

.sti-ai-input {
  width: 100%;
  max-height: 110px;
  resize: none;
  border: 1px solid var(--sti-border);
  border-radius: 14px;
  padding: 11px 12px;
  outline: none;
  background: #fff;
  color: var(--sti-black);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
}

.sti-ai-input:focus {
  border-color: var(--sti-gold);
  box-shadow: 0 0 0 3px rgba(185, 147, 85, 0.13);
}

.sti-ai-send {
  min-width: 68px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  padding: 0 13px;
  background: var(--sti-black);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.sti-ai-send:disabled,
.sti-ai-input:disabled {
  cursor: wait;
  opacity: 0.58;
}

@media (max-width: 560px) {
  .sti-ai-root {
    right: 12px;
    bottom: 12px;
  }

  .sti-ai-launcher {
    width: 58px;
    min-width: 58px;
    padding: 0;
    justify-content: center;
  }

  .sti-ai-launcher__label {
    display: none;
  }

  .sti-ai-panel {
    position: fixed;
    inset: 8px;
    width: auto;
    height: auto;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .sti-ai-launcher,
  .sti-ai-product {
    transition: transform 140ms ease, border-color 140ms ease;
  }
}
/* Stage 4.1 local product reveal controls */
.sti-ai-product-results__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 15px;
  padding: 2px 2px 0;
}

.sti-ai-product-results__status {
  color: #6c6254;
  font-size: 12px;
}

.sti-ai-show-more {
  border: 1px solid rgba(21, 21, 21, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  background: #151515;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.sti-ai-show-more:hover {
  transform: translateY(-1px);
}
/* Stage 6.4B — Fragrance DNA visual cards */
.sti-ai-dna-card {
  margin: 2px 0 15px;
  padding: 14px;
  border: 1px solid rgba(185, 147, 85, 0.3);
  border-radius: 17px;
  background:
    radial-gradient(circle at top right, rgba(185, 147, 85, 0.14), transparent 38%),
    linear-gradient(180deg, #fff, #fbfaf7);
  box-shadow: 0 10px 28px rgba(21, 21, 21, 0.06);
}

.sti-ai-dna-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.sti-ai-dna-card__title-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sti-ai-dna-card__eyebrow {
  color: var(--sti-gold);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sti-ai-dna-card__title {
  color: var(--sti-black);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.25;
}

.sti-ai-dna-confidence {
  flex: 0 0 auto;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 999px;
  padding: 5px 7px;
  background: rgba(255, 255, 255, 0.76);
  color: #6c6254;
  font-size: 9px;
  font-weight: 700;
  text-transform: capitalize;
}

.sti-ai-dna-confidence--strong {
  border-color: rgba(185, 147, 85, 0.35);
  color: #725a32;
}

.sti-ai-dna-scores {
  display: grid;
  gap: 8px;
}

.sti-ai-dna-score {
  display: grid;
  gap: 4px;
}

.sti-ai-dna-score__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.sti-ai-dna-score__label {
  color: #3e3932;
  font-size: 11px;
  font-weight: 600;
}

.sti-ai-dna-score__value {
  color: var(--sti-black);
  font-size: 10px;
  font-weight: 700;
}

.sti-ai-dna-score__value--unknown {
  color: #9b958b;
  font-weight: 500;
}

.sti-ai-dna-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.08);
}

.sti-ai-dna-meter__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f1f1f, #b99355);
  transition: width 300ms ease;
}

.sti-ai-dna-meter--unknown {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(21, 21, 21, 0.045),
      rgba(21, 21, 21, 0.045) 5px,
      rgba(21, 21, 21, 0.075) 5px,
      rgba(21, 21, 21, 0.075) 10px
    );
}

.sti-ai-dna-meter--unknown .sti-ai-dna-meter__fill {
  display: none;
}

.sti-ai-dna-tags {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.sti-ai-dna-tags__label {
  color: #6c6254;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sti-ai-dna-tags__items {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sti-ai-dna-tag {
  border: 1px solid rgba(185, 147, 85, 0.23);
  border-radius: 999px;
  padding: 4px 7px;
  background: rgba(248, 245, 239, 0.9);
  color: #5c5142;
  font-size: 10px;
  line-height: 1.2;
}

.sti-ai-dna-card__note {
  margin: 12px 0 0;
  color: #8a8278;
  font-size: 9px;
  line-height: 1.4;
}

.sti-ai-dna-compare__names {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  margin: 7px 0 13px;
  text-align: center;
}

.sti-ai-dna-compare__names strong {
  min-width: 0;
  overflow: hidden;
  color: var(--sti-black);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.sti-ai-dna-compare__names span {
  color: var(--sti-gold);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.sti-ai-dna-compare__table {
  display: grid;
  gap: 8px;
}

.sti-ai-dna-compare__row {
  display: grid;
  gap: 4px;
}

.sti-ai-dna-compare__label {
  text-align: center;
  color: #6c6254;
  font-size: 10px;
  font-weight: 700;
}

.sti-ai-dna-compare__values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sti-ai-dna-compare__side {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 5px;
}

.sti-ai-dna-compare__side--left .sti-ai-dna-meter__fill {
  background: linear-gradient(90deg, #151515, #7b6c58);
}

.sti-ai-dna-compare__side--right .sti-ai-dna-meter__fill {
  background: linear-gradient(90deg, #8f6f3a, #c6a66f);
}

.sti-ai-dna-compare__number {
  color: var(--sti-black);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.sti-ai-dna-meter--compare {
  height: 6px;
}

@media (max-width: 560px) {
  .sti-ai-dna-card {
    padding: 12px;
  }

  .sti-ai-dna-card__header {
    align-items: flex-start;
  }

  .sti-ai-dna-confidence {
    max-width: 92px;
    text-align: center;
  }
}


/* Stage 7.1 — Personal Shopper basket card */
.sti-ai-cart-card {
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.sti-ai-cart-card__title,
.sti-ai-cart-card__summary {
  display: block;
}

.sti-ai-cart-card__title {
  font-size: 14px;
  margin-bottom: 5px;
}

.sti-ai-cart-card__summary {
  font-size: 13px;
  opacity: 0.72;
  margin-bottom: 11px;
}

.sti-ai-cart-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  background: #111;
  color: #fff;
}


/* Stage 7.2 — Interactive Shopify basket */
.sti-ai-live-cart-card {
  margin: 10px 0 14px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.sti-ai-live-cart-card__heading {
  font-weight: 700;
  margin-bottom: 10px;
}

.sti-ai-live-cart-card__empty {
  font-size: 13px;
  opacity: 0.7;
}

.sti-ai-live-cart-card__items {
  display: grid;
  gap: 10px;
}

.sti-ai-live-cart-item {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.sti-ai-live-cart-item__info {
  min-width: 0;
}

.sti-ai-live-cart-item__title,
.sti-ai-live-cart-item__price {
  display: block;
}

.sti-ai-live-cart-item__title {
  font-size: 13px;
  line-height: 1.35;
}

.sti-ai-live-cart-item__price {
  margin-top: 2px;
  font-size: 12px;
  opacity: 0.68;
}

.sti-ai-live-cart-item__controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sti-ai-live-cart-item__control,
.sti-ai-live-cart-item__remove {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  cursor: pointer;
}

.sti-ai-live-cart-item__control {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
}

.sti-ai-live-cart-item__quantity {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.sti-ai-live-cart-item__remove {
  margin-left: auto;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.sti-ai-live-cart-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
}

.sti-ai-live-cart-card__review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

/* Stage 10.5.1 — human handoff card */
.sti-ai-handoff {
  margin: 10px 12px 14px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.sti-ai-handoff__title { font-weight: 650; margin-bottom: 6px; }
.sti-ai-handoff__privacy { font-size: 12px; line-height: 1.4; opacity: .72; margin-bottom: 10px; }
.sti-ai-handoff__actions, .sti-ai-handoff__form { display: flex; gap: 8px; flex-wrap: wrap; }
.sti-ai-handoff__form[hidden] { display: none; }
.sti-ai-handoff__button {
  appearance: none; border: 0; border-radius: 999px; padding: 9px 12px;
  background: #111; color: #fff; font: inherit; font-size: 13px; cursor: pointer; text-decoration: none;
}
.sti-ai-handoff__button--secondary { background: #f2f2f2; color: #111; }
.sti-ai-handoff__input, .sti-ai-handoff__select {
  min-width: 0; flex: 1 1 150px; border: 1px solid rgba(0,0,0,.18); border-radius: 10px;
  padding: 9px 10px; font: inherit; font-size: 13px; background: #fff; color: #111;
}
.sti-ai-handoff__status { width: 100%; font-size: 12px; line-height: 1.4; margin-top: 2px; }
