/* Pooshino try-on: base layout. Theme sizes come from match-cart + injected styles. */

html body .pooshino-tryon-wrap {
  box-sizing: border-box;
  max-width: 100%;
}

/* Sit cleanly under / beside WooCommerce cart controls */
html body form.cart .pooshino-tryon-wrap,
html body .cart .pooshino-tryon-wrap {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
}

html body .pooshino-tryon-wrap .pooshino-tryon-btn {
  max-width: 100%;
}

html body li.product .pooshino-tryon-wrap,
html body .wc-block-grid__product .pooshino-tryon-wrap {
  width: 100%;
}

/* Voice summary — WhatsApp-like player (themed by --pooshino-voice-color) */
html body .pooshino-voice-wrap {
  --pooshino-voice-color: #1a56d6;
  --pooshino-voice-soft: rgba(26, 86, 214, 0.08);
  --pooshino-voice-border: rgba(26, 86, 214, 0.18);
  --pooshino-voice-wave: rgba(26, 86, 214, 0.35);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

html body .pooshino-voice-player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 360px);
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--pooshino-voice-border);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--pooshino-voice-soft), #fff);
  box-sizing: border-box;
  overflow: hidden;
}

html body .pooshino-voice-player.is-building > :not(.pooshino-voice-building),
html body .pooshino-voice-player.is-error > :not(.pooshino-voice-building) {
  filter: blur(1.2px) saturate(0.75);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

html body .pooshino-voice-building {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  box-sizing: border-box;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

html body .pooshino-voice-building[hidden] {
  display: none !important;
}

html body .pooshino-voice-building__panel {
  width: 100%;
  display: grid;
  gap: 6px;
  justify-items: stretch;
  text-align: center;
}

html body .pooshino-voice-building__title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

html body .pooshino-voice-building__hint {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

html body .pooshino-voice-building__bar {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

html body .pooshino-voice-building__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--pooshino-voice-color),
    color-mix(in srgb, var(--pooshino-voice-color) 70%, #fff)
  );
  transition: width 0.22s linear;
}

html body .pooshino-voice-building__pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--pooshino-voice-color);
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

html body .pooshino-voice-player.is-error .pooshino-voice-building {
  background: rgba(255, 247, 247, 0.92);
}

html body .pooshino-voice-player.is-error .pooshino-voice-building__title {
  color: #b91c1c;
}

html body .pooshino-voice-player.is-error .pooshino-voice-building__hint {
  color: #7f1d1d;
  font-weight: 700;
}

html body .pooshino-voice-player.is-error .pooshino-voice-building__bar,
html body .pooshino-voice-player.is-error .pooshino-voice-building__pct {
  display: none !important;
}

html body .pooshino-voice-building__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 2px auto 0;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--pooshino-voice-color);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

html body .pooshino-voice-building__dismiss[hidden] {
  display: none !important;
}

html body .pooshino-voice-player.is-error .pooshino-voice-building__dismiss {
  background: #b91c1c;
}


html body .pooshino-voice-player audio {
  display: none;
}

html body .pooshino-voice-play {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--pooshino-voice-color);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

html body .pooshino-voice-play svg {
  width: 18px;
  height: 18px;
  display: block;
}

html body .pooshino-voice-play.is-playing .icon-play {
  display: none;
}

html body .pooshino-voice-play:not(.is-playing) .icon-pause {
  display: none;
}

html body .pooshino-voice-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pooshino-voice-spin 0.7s linear infinite;
}

html body .pooshino-voice-play.is-loading .icon-play,
html body .pooshino-voice-play.is-loading .icon-pause {
  display: none;
}

html body .pooshino-voice-play.is-loading .pooshino-voice-spinner {
  display: block;
}

html body .pooshino-voice-play.is-loading {
  cursor: wait;
  opacity: 0.9;
}

@keyframes pooshino-voice-spin {
  to { transform: rotate(360deg); }
}

html body .pooshino-voice-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

html body .pooshino-voice-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

html body .pooshino-voice-progress {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  direction: ltr;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

html body .pooshino-voice-progress[aria-disabled="true"] {
  cursor: default;
  opacity: 0.55;
  pointer-events: none;
}

html body .pooshino-voice-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 0 2px;
  pointer-events: none;
}

html body .pooshino-voice-wave span {
  flex: 1 1 0;
  max-width: 3px;
  border-radius: 99px;
  background: var(--pooshino-voice-wave);
  transform-origin: center;
  height: 28%;
  opacity: 0.85;
}

html body .pooshino-voice-wave span:nth-child(2n) { height: 48%; }
html body .pooshino-voice-wave span:nth-child(3n) { height: 72%; }
html body .pooshino-voice-wave span:nth-child(4n) { height: 38%; }
html body .pooshino-voice-wave span:nth-child(5n) { height: 88%; }
html body .pooshino-voice-wave span:nth-child(7n) { height: 56%; }

html body .pooshino-voice-player.is-playing .pooshino-voice-wave span {
  animation: pooshino-voice-bar 0.95s ease-in-out infinite;
}

html body .pooshino-voice-player.is-playing .pooshino-voice-wave span:nth-child(2n) {
  animation-delay: 0.07s;
}
html body .pooshino-voice-player.is-playing .pooshino-voice-wave span:nth-child(3n) {
  animation-delay: 0.14s;
}
html body .pooshino-voice-player.is-playing .pooshino-voice-wave span:nth-child(5n) {
  animation-delay: 0.21s;
}

@keyframes pooshino-voice-bar {
  0%, 100% { transform: scaleY(0.55); opacity: 0.65; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

html body .pooshino-voice-fill {
  position: absolute;
  top: 50%;
  right: 0;
  left: auto;
  height: 4px;
  width: var(--voice-progress, 0%);
  transform: translateY(-50%);
  border-radius: 99px;
  background: var(--pooshino-voice-color);
  pointer-events: none;
  transition: width 0.18s linear;
}

html body .pooshino-voice-thumb {
  position: absolute;
  top: 50%;
  right: var(--voice-progress, 0%);
  left: auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pooshino-voice-color);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.28);
  transform: translate(50%, -50%);
  pointer-events: none;
  transition: right 0.18s linear;
  z-index: 1;
}

html body .pooshino-voice-progress.is-seeking .pooshino-voice-fill,
html body .pooshino-voice-progress.is-seeking .pooshino-voice-thumb {
  transition: none;
}

html body .pooshino-voice-times {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

html body .pooshino-voice-duration {
  margin-inline-start: auto;
}

html body .pooshino-voice-brand {
  margin: 0;
  padding: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: #94a3b8;
  text-decoration: none;
  white-space: nowrap;
}

html body .pooshino-voice-brand:hover,
html body .pooshino-voice-brand:focus {
  color: var(--pooshino-voice-color);
  text-decoration: none;
}
