/**
 * scroll-style-ck.css
 * Modern scroll arrows - theme-based design
 * Uses --plyr-color-main (theme color) from css_general
 */

.scroll-post-arrows {
  position: fixed;
  right: 24px;
  bottom: 100px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.35s;
}

.scroll-post-arrows.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-post-btn {
  --scroll-theme: var(--plyr-color-main, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 14px;
  background: color-mix(in srgb, var(--scroll-theme) 12%, transparent);
  color: var(--scroll-theme);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  -webkit-tap-highlight-color: transparent;
}

.scroll-post-btn:hover {
  background: color-mix(in srgb, var(--scroll-theme) 22%, transparent);
  color: var(--scroll-theme);
  transform: scale(1.08);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--scroll-theme) 25%, transparent);
}

.scroll-post-btn:active {
  transform: scale(0.96);
  transition-duration: 0.1s;
}

.scroll-post-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.scroll-post-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.scroll-post-btn:hover .scroll-post-icon {
  transform: translateY(-2px);
}

.scroll-post-btn-down:hover .scroll-post-icon {
  transform: translateY(2px);
}

.scroll-post-divider {
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px 0;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--plyr-color-main, #6366f1) 40%, transparent),
    transparent
  );
}

/* Bounce animation on first appearance */
.scroll-post-arrows.is-visible .scroll-post-btn-up {
  animation: scroll-btn-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.scroll-post-arrows.is-visible .scroll-post-btn-down {
  animation: scroll-btn-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes scroll-btn-pop {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Ripple effect on click */
.scroll-post-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at center,
    color-mix(in srgb, var(--plyr-color-main, #6366f1) 30%, transparent) 0%,
    transparent 70%
  );
  opacity: 0;
  transform: scale(0);
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

.scroll-post-btn:active::after {
  opacity: 1;
  transform: scale(1.5);
  transition-duration: 0.2s;
}

.scroll-post-btn {
  position: relative;
  overflow: hidden;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .scroll-post-btn {
  background: color-mix(in srgb, var(--plyr-color-main, #6366f1) 18%, rgba(255, 255, 255, 0.05));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .scroll-post-btn:hover {
  background: color-mix(in srgb, var(--plyr-color-main, #6366f1) 28%, rgba(255, 255, 255, 0.08));
}

/* Mobile: smaller and adjusted position */
@media (max-width: 767px) {
  .scroll-post-arrows {
    right: 16px;
    bottom: 80px;
  }

  .scroll-post-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .scroll-post-icon svg {
    width: 18px;
    height: 18px;
  }
}
