/* Size card + stylist-style fit chat. Cream / ink / wine. */

.pdp-size-card {
  margin: 0 0 28px;
  padding: 16px 16px 18px;
  background: var(--sf-color-cream, #f7f3ef);
  border: 1px solid rgba(26, 26, 26, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 22px 48px -28px rgba(26, 26, 26, 0.32);
}
.pdp-size-card .pdp-option-head {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.pdp-size-card .pdp-options { margin-bottom: 0; }

.pdp-fit-open {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px 0 11px;
  border: 0;
  background: #1a1a1a;
  color: #fff;
  font-family: var(--sf-font-serif, "Playfair Display", Georgia, serif);
  font-size: 0.98rem;
  font-style: italic;
  letter-spacing: -0.02em;
  cursor: pointer;
  border-radius: 999px !important;
  -webkit-tap-highlight-color: transparent;
}
.pdp-fit-open__mark {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}
.pdp-fit-open:hover { background: #2a2a2a; }
.pdp-fit-open.is-on { background: #000; }

body.fit-chat-open { overflow: hidden; }
body.fit-chat-open .wm-stylist--dock { display: none !important; }

.pdp-fit-spot {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
  visibility: hidden;
}
.pdp-fit-spot.is-open {
  pointer-events: auto;
  visibility: visible;
}
.pdp-fit-spot-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 18, 0.28);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  opacity: 0;
  transition: opacity 0.36s cubic-bezier(0.32, 0.72, 0, 1);
}
.pdp-fit-spot.is-open .pdp-fit-spot-backdrop { opacity: 1; }

.pdp-fit-card {
  position: relative;
  width: min(420px, 100%);
  height: min(620px, 86vh);
  display: flex;
  flex-direction: column;
  background: rgba(20, 18, 18, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px -28px rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  color: #fff;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition:
    opacity 0.42s cubic-bezier(0.32, 0.72, 0, 1),
    transform 0.48s cubic-bezier(0.32, 0.72, 0, 1);
}
.pdp-fit-spot.is-open .pdp-fit-card {
  opacity: 1;
  transform: none;
}

.pdp-fit-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 0;
}
.pdp-fit-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.pdp-fit-chrome-actions { display: flex; align-items: center; gap: 10px; }
.pdp-fit-table {
  border: 0;
  padding: 0;
  background: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pdp-fit-table:hover { color: #fff; }
.pdp-fit-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pdp-fit-close:hover { background: rgba(255, 255, 255, 0.2); }
.pdp-fit-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}

.pdp-fit-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 18px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.pdp-fit-msg { display: flex; flex-direction: column; }
.pdp-fit-msg--user { align-items: flex-end; }
.pdp-fit-msg--user .pdp-fit-text {
  max-width: 82%;
  padding: 9px 15px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.94rem;
  line-height: 1.35;
}
.pdp-fit-msg--ai { align-items: stretch; gap: 12px; }
.pdp-fit-text--ai {
  margin: 0;
  font-family: var(--sf-font-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  font-style: italic;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}
.pdp-fit-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}
.pdp-fit-size {
  font-family: var(--sf-font-serif, "Playfair Display", Georgia, serif);
  font-size: 4rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.85;
}
.pdp-fit-wear {
  border: 0;
  padding: 0;
  background: none;
  font-family: var(--sf-font-serif, "Playfair Display", Georgia, serif);
  font-size: 1.1rem;
  font-style: italic;
  color: #f3c9d2;
  cursor: pointer;
}
.pdp-fit-wear:hover { opacity: 0.75; }

.pdp-fit-typing {
  display: inline-flex;
  gap: 5px;
  align-self: center;
  padding: 8px 0;
}
.pdp-fit-typing span {
  width: 6px;
  height: 6px;
  background: #fff;
  animation: pdp-fit-bob 1.1s infinite ease-in-out;
}
.pdp-fit-typing span:nth-child(2) { animation-delay: 0.15s; }
.pdp-fit-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes pdp-fit-bob {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-4px); }
}

.pdp-fit-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 12px 12px;
  padding: 7px 7px 7px 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(26, 26, 26, 0.08);
  box-shadow: 0 18px 40px -22px rgba(30, 22, 20, 0.38);
  border-radius: 999px !important;
}
.pdp-fit-label {
  flex: 0 0 auto;
  padding-right: 12px;
  border-right: 1px solid rgba(26, 26, 26, 0.1);
  color: rgba(26, 26, 26, 0.46);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pdp-fit-bar input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  background: transparent;
  color: #1a1a1a;
  font: inherit;
  font-size: 0.98rem;
  outline: none;
}
.pdp-fit-bar input::placeholder { color: rgba(26, 26, 26, 0.38); }
.pdp-fit-send {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 999px !important;
}
.pdp-fit-send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pdp-fit-send:hover { background: #2a2a2a; }
.pdp-fit-card.is-busy .pdp-fit-send { opacity: 0.45; pointer-events: none; }

@media (max-width: 720px) {
  .pdp-fit-spot {
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    place-items: end center;
  }
  .pdp-fit-card {
    width: 100%;
    height: min(72vh, 560px);
  }
}
