/* Audio Story Images - Modern Styling */

.asi-img {
  display: inline-block !important;
}

.asi-player-icon {
  cursor: pointer;
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 10;

  // Circular progress indicator
  &::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: conic-gradient(white var(--progress, 0%), transparent var(--progress, 0%));
    mask: radial-gradient(farthest-side, transparent calc(90%), black calc(90%));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(90%), black calc(90%));
    pointer-events: none;
  }

  &:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
  }

  &:active {
    transform: scale(0.95);
  }

  svg {
    width: 24px;
    height: 24px;
    fill: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  }

  &.asi-plus-icon {
    display: none;

    svg {
      animation: asi-pulse 1.5s ease-in-out infinite;
    }
  }

  &.asi-size-small {
    width: 36px;
    height: 36px;

    svg {
      width: 18px;
      height: 18px;
    }
  }

  &.asi-size-medium {
    width: 56px;
    height: 56px;

    svg {
      width: 28px;
      height: 28px;
    }
  }

  &.asi-size-big {
    width: 72px;
    height: 72px;

    svg {
      width: 36px;
      height: 36px;
    }
  }

  &.asi-style-solid {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 1);

    &:hover {
      background: rgba(37, 99, 235, 1);
    }
  }

  &.asi-style-minimal {
    background: transparent;
    border: none;
    box-shadow: none;

    &:hover {
      background: rgba(0, 0, 0, 0.3);
    }
  }

  &.asi-style-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);

    &:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: white;
    }
  }

  // Autoplay-ready indicator: scale+opacity pulse on the queued-but-blocked icon
  &.asi-autoplay-ready {
    animation: asi-autoplay-pulse 2s ease-in-out infinite;
  }
}

@keyframes asi-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes asi-autoplay-pulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(1.2); opacity: 0.8; }
  100% { transform: scale(1);   opacity: 1; }
}

// Autoplay notice overlay
.asi-autoplay-notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;

  &.asi-autoplay-notice-visible {
    opacity: 1;
    pointer-events: auto;
  }
}

.asi-autoplay-notice-content {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.asi-autoplay-notice-icon {
  font-size: 18px;
}

.asi-autoplay-notice-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
