.frame-animation-preview-selector {
  padding: 0;
}

.frame-animation-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.frame-animation-preview-item {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 8px;
  transition: all 0.2s ease;
  background: #f0f0f0;
}

.frame-animation-preview-item:hover {
  border-color: #2669e6;
  background: #e8f4fd;
}

.frame-animation-preview-item.is-active {
  border-color: #2669e6;
  background: #e8f4fd;
  box-shadow: 0 0 0 1px #2669e6;
}

.frame-animation-preview-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 6px;
}

.frame-animation-preview-button {
  position: relative;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 3px;
  background: #1e1e1e;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
}

.frame-animation-preview-button .wp-block-zenblocks-button-basic-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame-animation-preview-button .wp-block-zenblocks-button-basic-text {
  display: block;
}

.frame-animation-preview-button .wp-block-zenblocks-button-basic-text .default {
  display: block;
}

.frame-animation-preview-button .wp-block-zenblocks-button-basic-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  overflow: hidden;
}

.frame-animation-preview-button .wp-block-zenblocks-button-basic-bg-color {
  position: absolute;
  inset: 0;
  background: #1e1e1e;
}

.frame-animation-preview-button .wp-block-zenblocks-button-basic-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}

/* neon-01はbox-shadowを使うのでoverflow: visibleが必要 */
.frame-animation-preview-neon-01 .frame-animation-preview-button {
  overflow: visible;
}

.frame-animation-preview-neon-01 .frame-animation-preview-button .wp-block-zenblocks-button-basic-frame {
  overflow: visible;
}

.frame-animation-preview-label {
  text-align: center;
}

.frame-animation-preview-label .frame-animation-name {
  font-size: 11px;
  color: #1e1e1e;
  font-weight: 500;
}

/* ====================================
   フレームアニメーション プレビュー用スタイル
   ==================================== */

/* shine-01: 左から右へ光が流れる */
.frame-animation-preview-shine-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-shine-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: frame-shine-01 var(--frame-animation-duration, 2000ms) var(--frame-animation-easing, ease-in-out) infinite;
}

/* shine-02: 斜めに光が流れる */
.frame-animation-preview-shine-02 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-shine-02.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 80%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-25deg);
  animation: frame-shine-02 var(--frame-animation-duration, 2000ms) var(--frame-animation-easing, ease-in-out) infinite;
}

/* sparkle-01: 6箇所で星がキラキラ光る */
.frame-animation-preview-sparkle-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-sparkle-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::after,
.frame-animation-preview-sparkle-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-sparkle-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 30%, transparent 70%);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.frame-animation-preview-sparkle-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-sparkle-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::before {
  animation: frame-sparkle-01a var(--frame-animation-duration, 2000ms) ease-in-out infinite;
}

.frame-animation-preview-sparkle-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::after,
.frame-animation-preview-sparkle-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::after {
  animation: frame-sparkle-01b var(--frame-animation-duration, 2000ms) ease-in-out infinite;
  animation-delay: 150ms;
}

/* border-run-01: 光のラインがボタンの周囲を走る */
.frame-animation-preview-border-run-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-border-run-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 50% 3px;
  background-repeat: no-repeat;
  background-position: -50% 0;
  animation: frame-border-run-01 var(--frame-animation-duration, 2000ms) linear infinite;
}

/* neon-01: ネオンサインのように発光 */
.frame-animation-preview-neon-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-neon-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: frame-neon-01 var(--frame-animation-duration, 2000ms) var(--frame-animation-easing, ease-in-out) infinite;
}

/* laser-01: 上下のレーザー光線 */
.frame-animation-preview-laser-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::before,
.frame-animation-preview-laser-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: frame-laser-horizontal var(--frame-animation-duration, 2000ms) linear infinite;
}

.frame-animation-preview-laser-01 .frame-animation-preview-button.is-force-animation .wp-block-zenblocks-button-basic-frame::after,
.frame-animation-preview-laser-01.is-hover-enabled .frame-animation-preview-button:hover .wp-block-zenblocks-button-basic-frame::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: frame-laser-horizontal var(--frame-animation-duration, 2000ms) linear infinite reverse;
}
