/* Mini-spot tiramisù checkout (prima della ruota) */
#tiramisu-spot-modal {
  --ts-gold: #fbbf24;
  --ts-ink: #0f172a;
  font-family: "Segoe UI", system-ui, sans-serif;
  box-sizing: border-box;
}

#tiramisu-spot-modal.tiramisu-spot-open {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding:
    max(10px, env(safe-area-inset-top, 0px))
    10px
    max(10px, env(safe-area-inset-bottom, 0px));
}

.tiramisu-spot-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 10%, rgba(251, 191, 36, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 45% at 50% 95%, rgba(180, 83, 9, 0.2), transparent 50%),
    rgba(2, 6, 23, 0.97);
}

.tiramisu-spot-panel {
  position: relative;
  z-index: 2;
  width: min(94vw, 420px);
  max-height: 92vh;
  max-height: 92dvh;
  max-height: 92svh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.85rem 1rem;
  border-radius: 1.35rem;
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 55%, #020617 100%);
  border: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.12),
    0 25px 60px rgba(0, 0, 0, 0.55);
  text-align: center;
  color: #e2e8f0;
  animation: tiramisu-spot-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes tiramisu-spot-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.tiramisu-spot-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ts-gold);
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}

.tiramisu-spot-title {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 0.2rem;
  flex-shrink: 0;
}

.tiramisu-spot-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0 0 0.6rem;
  line-height: 1.35;
  flex-shrink: 0;
}

.tiramisu-spot-stage {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  width: 100%;
  height: 200px;
  max-height: 32vh;
  max-height: 32svh;
  flex-shrink: 0;
  background: #020617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.tiramisu-spot-stage.is-dual {
  height: 168px;
  max-height: 26vh;
  max-height: 26svh;
}

.tiramisu-spot-reel {
  position: absolute;
  inset: 0;
  display: flex;
}

.tiramisu-spot-shot {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.tiramisu-spot-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  animation: tiramisu-kenburns 3.4s ease-out both;
}

@keyframes tiramisu-kenburns {
  from { transform: scale(1.16) translateY(3%); }
  to { transform: scale(1.02) translateY(0); }
}

.tiramisu-spot-caption {
  position: absolute;
  left: 0.45rem;
  right: 0.45rem;
  bottom: 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.tiramisu-spot-prices {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  z-index: 2;
  pointer-events: none;
}

.tiramisu-spot-old {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fecaca;
  position: relative;
  animation: tiramisu-old-in 0.45s ease both 0.2s;
}

.tiramisu-spot-old::after {
  content: "";
  position: absolute;
  left: -6%;
  top: 52%;
  width: 0;
  height: 3px;
  background: #ef4444;
  transform: rotate(-12deg);
  animation: tiramisu-strike 0.35s ease forwards 0.7s;
}

@keyframes tiramisu-old-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tiramisu-strike {
  to { width: 112%; }
}

.tiramisu-spot-new {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--ts-gold);
  text-shadow: 0 0 18px rgba(251, 191, 36, 0.45);
  animation: tiramisu-new-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.85s;
}

@keyframes tiramisu-new-pop {
  0% { opacity: 0; transform: scale(0.55) rotate(-8deg); }
  70% { opacity: 1; transform: scale(1.12) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.tiramisu-spot-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.tiramisu-spot-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  animation: tiramisu-bar 2.4s linear both;
}

@keyframes tiramisu-bar {
  to { width: 100%; }
}

.tiramisu-spot-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.7rem;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  opacity: 1;
  pointer-events: auto;
  touch-action: manipulation;
}

.tiramisu-spot-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.tiramisu-spot-add-row.is-single {
  grid-template-columns: 1fr;
}

.tiramisu-spot-btn {
  flex: 1;
  min-width: 130px;
  border: 0;
  border-radius: 0.85rem;
  padding: 0.72rem 0.7rem;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tiramisu-spot-btn-primary {
  background: linear-gradient(180deg, #fbbf24, #d97706);
  color: #1c1003;
}

.tiramisu-spot-btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.tiramisu-spot-skip {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.4rem;
}

/* App nativa e schermi bassi: niente animazione che parte da opacity 0
   (sul WebView resta ferma e lo spot non si vede). */
#tiramisu-spot-modal.is-native .tiramisu-spot-panel,
#tiramisu-spot-modal.is-compact .tiramisu-spot-panel,
#tiramisu-spot-modal.is-native .tiramisu-spot-old,
#tiramisu-spot-modal.is-compact .tiramisu-spot-old,
#tiramisu-spot-modal.is-native .tiramisu-spot-new,
#tiramisu-spot-modal.is-compact .tiramisu-spot-new,
#tiramisu-spot-modal.is-native .tiramisu-spot-shot img,
#tiramisu-spot-modal.is-compact .tiramisu-spot-shot img {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

#tiramisu-spot-modal.is-native .tiramisu-spot-old::after,
#tiramisu-spot-modal.is-compact .tiramisu-spot-old::after {
  width: 112%;
  animation: none;
}

@media (max-height: 720px) {
  .tiramisu-spot-title { font-size: 1.2rem; }
  .tiramisu-spot-stage { height: 150px; }
  .tiramisu-spot-stage.is-dual { height: 132px; }
}

@media (prefers-reduced-motion: reduce) {
  .tiramisu-spot-shot img,
  .tiramisu-spot-old,
  .tiramisu-spot-old::after,
  .tiramisu-spot-new,
  .tiramisu-spot-progress > span,
  .tiramisu-spot-panel {
    animation: none !important;
  }
  .tiramisu-spot-shot img { transform: none; }
  .tiramisu-spot-new { opacity: 1; transform: none; }
  .tiramisu-spot-old::after { width: 112%; }
  .tiramisu-spot-progress > span { width: 100%; }
}
