/* Layout fixes for the outfit rail */
.railwrap { padding-top: 0; }
.rail { padding-top: 16px; }
.hung { flex: 0 0 27%; max-width: 130px; }

/* ---------- today's options: swipe across, pick one ---------- */
.options {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -18px; padding: 4px 18px 12px;
}
.options::-webkit-scrollbar { display: none; }
.option {
  flex: 0 0 84%; scroll-snap-align: center; background: var(--card); border-radius: 22px; padding: 18px 16px 16px;
  display: grid; gap: 12px; align-content: start;
}
.option:only-child { flex-basis: 100%; }
.option-pieces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.option-pieces img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--paper); }
.option .btn { margin-top: 2px; }

/* ---------- waiting: a hanger swings on the button and a marigold thread runs along its edge ---------- */
.btn[disabled] {
  opacity: 1; position: relative; overflow: hidden; cursor: progress;
  background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rail);
}
.btn[disabled]::before {
  content: ""; display: inline-block; width: 24px; height: 24px; margin-right: 10px; vertical-align: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23151B33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 7c0-1.700 1-2.500 2-2.500s2 .9 2 2c0 1.200-1 1.800-2 2.300-.7.4-1 .9-1 1.600'/%3E%3Cpath d='M13 10.500 21 16a1 1 0 0 1-.6 1.900H3.600a1 1 0 0 1-.6-1.900L11 10.500'/%3E%3C/svg%3E") center / contain no-repeat;
  transform-origin: 55% 12%; animation: vazi-swing 0.85s ease-in-out infinite alternate;
}
.btn[disabled]::after, .dressing::after, .working::after {
  content: ""; position: absolute; left: -40%; bottom: 0; height: 4px; width: 40%;
  background: var(--marigold); border-radius: 4px; animation: vazi-thread 1.4s ease-in-out infinite;
}
.working { position: relative; overflow: hidden; padding-bottom: 12px; }
.boot::after { content: ""; display: block; width: 44px; height: 4px; margin: 14px auto 0; border-radius: 4px; background: var(--marigold); animation: vazi-pulse 0.9s ease-in-out infinite alternate; }

/* ---------- the model getting dressed while a preview is made ---------- */
.dressing {
  position: relative; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 16px; background: var(--paper);
  display: grid; align-content: center; justify-items: center; gap: 18px; padding: 20px;
}
.dressing-pieces { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 68%; }
.dressing-pieces img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--card);
  transform-origin: 50% -30%; animation: vazi-hang 2.2s ease-in-out infinite;
}
.dressing-msg { font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-align: center; min-height: 1.5em; }
.reveal { animation: vazi-reveal 0.7s ease-out both; }

/* ---------- hanging up new clothes: each item drops onto the rail as it is recognised ---------- */
.hangup { background: var(--card); border-radius: 22px; padding: 18px 16px 16px; display: grid; gap: 12px; overflow: hidden; }
.hangup[hidden] { display: none; }
.hangup-count { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.1; }
.bar { height: 8px; border-radius: 8px; background: var(--paper); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--marigold); border-radius: 8px; transition: width 0.45s ease; }
.hangup .railwrap { margin: 0 -16px; min-height: 150px; }
.drop { transform-origin: 50% -12%; animation: vazi-drop 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
.hangup-quip { min-height: 1.5em; }

/* ---------- asking for a change ---------- */
.chat { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
.chat .btn { padding: 12px 16px; }
.said { display: grid; gap: 6px; }
.said-you { justify-self: end; max-width: 85%; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 14px 14px 4px 14px; font-size: 0.92rem; }
.said-vazi { justify-self: start; max-width: 92%; background: #FFF4DD; padding: 10px 12px; border-radius: 14px 14px 14px 4px; font-size: 0.95rem; }

@keyframes vazi-swing { from { transform: rotate(-22deg); } to { transform: rotate(22deg); } }
@keyframes vazi-thread { from { left: -40%; } to { left: 100%; } }
@keyframes vazi-pulse { from { transform: scaleX(0.4); opacity: 0.5; } to { transform: scaleX(1.6); opacity: 1; } }
@keyframes vazi-hang { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg) translateY(-4px); } }
@keyframes vazi-reveal { from { opacity: 0; transform: scale(0.97); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes vazi-drop {
  0% { opacity: 0; transform: translateY(-46px) rotate(-14deg); }
  55% { opacity: 1; transform: translateY(0) rotate(8deg); }
  78% { transform: rotate(-4deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes vazi-deal { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.option { animation: vazi-deal 0.45s ease-out both; }

@media (prefers-reduced-motion: reduce) {
  .btn[disabled]::before, .btn[disabled]::after, .dressing::after, .working::after, .boot::after, .dressing-pieces img, .reveal, .drop, .option { animation: none; }
  .btn[disabled]::after, .dressing::after, .working::after { left: 0; width: 100%; opacity: 0.5; }
}
