/* Thumbnail hover actions + video summary layer */

.custom-content .thumb-wrap {
  position: relative;
}

.thumb-hover-actions {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

@media (hover: hover) and (pointer: fine) {
  .thumb-wrap:hover .thumb-hover-actions,
  .thumb-wrap:focus-within .thumb-hover-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

.thumb-wrap.is-thumb-actions-open .thumb-hover-actions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.thumb-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 148px;
  max-width: 90%;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.thumb-action-btn:hover,
.thumb-action-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

/* テーマの a:hover 色上書きを防ぐ（白ボタン上で文字が消えないように） */
.thumb-hover-actions a.thumb-action-btn--watch,
.thumb-hover-actions a.thumb-action-btn--watch:link,
.thumb-hover-actions a.thumb-action-btn--watch:visited,
.thumb-hover-actions a.thumb-action-btn--watch:hover,
.thumb-hover-actions a.thumb-action-btn--watch:focus,
.thumb-hover-actions a.thumb-action-btn--watch:focus-visible,
.thumb-hover-actions a.thumb-action-btn--watch:active {
  color: #111 !important;
  background: #fff;
  text-decoration: none !important;
}

.thumb-hover-actions a.thumb-action-btn--watch:hover,
.thumb-hover-actions a.thumb-action-btn--watch:focus-visible {
  color: #111 !important;
  background: #ececec;
}

.thumb-action-btn--summary,
.thumb-action-btn--summary:hover,
.thumb-action-btn--summary:focus-visible {
  color: #fff;
  background: #1e88e5;
}

.thumb-action-btn--summary:hover,
.thumb-action-btn--summary:focus-visible {
  background: #1976d2;
  color: #fff;
}

.thumb-action-btn i {
  font-size: 12px;
}

/* Full-screen summary layer */
.video-summary-layer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.video-summary-layer[hidden] {
  display: none !important;
}

.video-summary-layer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.video-summary-layer__panel {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(88vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #111;
  color: #f5f5f5;
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.video-summary-layer__close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.video-summary-layer__close:hover,
.video-summary-layer__close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.video-summary-layer__body {
  padding: 28px 22px 24px;
  overflow: auto;
  min-height: 0;
}

.video-summary-layer__thumb-link {
  display: block;
  margin: 0 auto 16px;
  max-width: 420px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.video-summary-layer__thumb {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.video-summary-layer__title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
}

.video-summary-layer__disclaimer {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 193, 7, 0.14);
  color: #f0d48a;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
}

.video-summary-layer__disclaimer[hidden] {
  display: none !important;
}

.video-summary-layer__text {
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #ddd;
}

body.video-summary-layer-open {
  overflow: hidden;
}

@media (max-width: 560px) {
  .thumb-action-btn {
    min-width: 132px;
    padding: 9px 12px;
    font-size: 12px;
  }

  .video-summary-layer__body {
    padding: 24px 16px 18px;
  }
}
