/* SNA Beauty — floating video promo (prototype) */
.sna-story {
  --sna-story-w: 148px;
  --sna-story-radius: 14px;
  --sna-story-burgundy: #6b1f2a;

  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 99990;
  width: var(--sna-story-w);
  -webkit-font-smoothing: antialiased;
}

.sna-story.is-hidden {
  display: none;
}

.sna-story__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99989;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  padding: 0;
  cursor: pointer;
  animation: sna-story-fade-in 0.25s ease both;
}

.sna-story__backdrop.is-visible {
  display: block;
}

.sna-story.is-expanded {
  left: 50%;
  bottom: 50%;
  width: min(320px, calc(100vw - 32px));
  transform: translate(-50%, 50%);
  z-index: 99991;
}

.sna-story__card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--sna-story-radius);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: inherit;
  background: #1a0a0c;
  cursor: pointer;
  transform-origin: left bottom;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    opacity 0.3s ease,
    border-radius 0.3s ease;
  animation: sna-story-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sna-story:not(.is-expanded):not(.is-minimized) .sna-story__card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), 0 4px 12px rgba(0, 0, 0, 0.16);
}

.sna-story.is-expanded .sna-story__card {
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: none;
  cursor: default;
}

.sna-story__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.sna-story__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

.sna-story__play:hover {
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sna-story__play::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--sna-story-burgundy);
}

.sna-story.is-playing .sna-story__play,
.sna-story.is-expanded .sna-story__play {
  opacity: 0;
  pointer-events: none;
}

.sna-story__event {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 14px;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 999px;
  background: #c41e3a;
  color: #fff;
  font: 600 13px/1.2 "Helvetica Neue", Arial, sans-serif;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.sna-story.is-expanded .sna-story__event {
  display: flex;
}

.sna-story__toggle {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #1a1a1a;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.sna-story__toggle:hover {
  background: #000;
  transform: scale(1.06);
}

.sna-story.is-expanded .sna-story__toggle {
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
}

.sna-story__toggle-icon {
  display: block;
  width: 10px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

/* Minimized chip */
.sna-story.is-minimized .sna-story__card {
  width: 56px;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: none;
}

.sna-story.is-minimized .sna-story__play,
.sna-story.is-minimized .sna-story__event {
  display: none;
}

.sna-story.is-minimized .sna-story__toggle {
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
}

.sna-story.is-minimized .sna-story__toggle-icon {
  width: 8px;
  height: 8px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-sizing: border-box;
}

@keyframes sna-story-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sna-story-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .sna-story {
    --sna-story-w: 120px;
    left: 12px;
    bottom: 12px;
  }

  .sna-story.is-expanded {
    width: min(300px, calc(100vw - 24px));
  }

  .sna-story__play {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sna-story__card,
  .sna-story__play,
  .sna-story__toggle,
  .sna-story__backdrop {
    animation: none;
    transition: none;
  }
}
