/* ====================================================
   ポッドキャストセクション専用 CSS
   base/css/style.css の video-slide / module--podcast / podcast-lightbox /
   podcast-player ブロックを石黒テーマ向けに移植。色は石黒のオレンジ #003f88 系で固定。
   ==================================================== */

/* ---- セクション余白（石黒サイトの他モジュールと統一） ----- */
.module-feed-podcast {
  padding-top: 100px;
  padding-bottom: 0;
}

/* 「もっと聴く」ボタンの上余白 */
.module-feed-podcast .read-more { margin-top: 50px; }

/* 文字起こし一覧：ボタンではなくサイト標準のテキストリンク（既定の a 色・hover 下線に委ねる）。
   外部リンクアイコンだけは出さない。 */
.module-feed-podcast .podcast-tx-link { text-align: center; margin-top: 50px; margin-bottom: 0; }
.module-feed-podcast .podcast-tx-link + .read-more { margin-top: 14px; }
.podcast-tx-link a[target="_blank"]::after { content: none; }

/* ---- 横スライダー（slick） ---------------------------- */
.video-slide { visibility: hidden; overflow: hidden; }
.video-slide.slick-initialized { visibility: visible; }
.video-slide__item { padding: 0 8px; box-sizing: border-box; }
.video-slide .slick-list { margin: 0 -8px; }
.video-slide .slick-track { display: flex !important; }
.video-slide .slick-slide { height: auto !important; display: flex; flex-direction: column; }
.video-slide .slick-slide > div { flex: 1; display: flex; flex-direction: column; }
.video-slide__item { flex: 1; display: flex; flex-direction: column; position: relative; }
.video-slide__thumb img { transition: transform 0.4s ease; }
@media (hover: hover) {
	.video-slide__item:hover .video-slide__thumb img { transform: scale(1.04); opacity: 1; }
}
.video-slide__thumb { position: relative; clip-path: inset(0); }
.video-slide__thumb::after {
	content: ""; position: absolute; inset: 0;
	border: 1px solid #ddd; pointer-events: none; z-index: 1;
}
.video-slide__thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	background-color: #f7f7f7;
	box-sizing: border-box;
	display: block;
}
.video-slide__thumb .archive-new {
	position: absolute; top: 1px; left: 1px; z-index: 2;
}
.video-slide__body {
	background-color: #f7f7f7;
	padding: 10px;
	flex: 1;
}
.video-slide .slick-prev,
.video-slide .slick-next {
	width: 36px; height: 36px; z-index: 2;
	background-color: #003f88;
}
/* ライトボックス左右ボタンと同仕様：黄背景＋青矢印にスワップ。
   custom.css の汎用 button:hover が background-color を !important で
   上書きしてくるため、こちらも !important で打ち消す */
.video-slide .slick-prev:hover,
.video-slide .slick-next:hover { background-color: #ffc000 !important; }
.video-slide .slick-prev::before,
.video-slide .slick-next::before {
	content: "";
	position: absolute; top: 50%; left: 50%;
	width: 10px; height: 10px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
	transform: translate(-50%, -50%) rotate(45deg);
	opacity: 1;
}
.video-slide .slick-prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.video-slide .slick-prev:hover::before,
.video-slide .slick-next:hover::before {
	border-top-color: #003f88;
	border-right-color: #003f88;
}
.video-slide .slick-prev { left: 0; }
.video-slide .slick-next { right: 0; }

@media (max-width: 768px) {
	.video-slide__item { padding: 0 6px; }
}

/* card-container 内のテキスト調整 */
.video-slide__body .feed-post-title { font-size: 1em; line-height: 1.5em; font-weight: 500; margin: 0 0 .2em; }
.video-slide__body .feed-post-date { font-size: .9em; line-height: 1.6em; margin: 0; color: #555; }

/* NEW バッジ */
.video-slide .archive-new {
	display: inline-block;
	background: #cb171d;
	color: #fff;
	font-size: .75em;
	font-weight: 700;
	padding: 2px 8px;
	line-height: 1.4;
}

/* card 全体クリックレイヤー（base 由来 .full-range-link 相当） */
.video-slide__item .full-range-link { position: static; }
.video-slide__item .full-range-link::before {
	content: ""; position: absolute; inset: 0; z-index: 3; cursor: pointer;
}
/* キーボードで表示中カードにフォーカスが入ったら、カード全面の ::before に枠線を出す。
   ::before は .video-slide__item（position:relative）いっぱいに広がるためカード全体を囲める。
   .slick-slider * { outline:none } を詳細度と記述順で上書きする。podcast/YouTube 共通。 */
.video-slide__item .full-range-link:focus-visible::before {
	outline: 2px solid #003f88;
	outline-offset: -2px;
}

/* ---- ポッドキャスト固有 --------------------------- */
/* Apple/Spotify 仕様でアートワークは常に正方形 */
.module--podcast .video-slide__thumb img { aspect-ratio: 1 / 1; }

.podcast-list__duration {
	margin-left: 0.6em;
	white-space: nowrap;
}
.podcast-list__duration .podcast-list__duration-icon { margin-right: 0.2em; }

.feed-fallback-message { text-align: center; }

/* ---- ポッドキャストライトボックス --------------------------------- */
.podcast-lightbox .podcast-lightbox__frame {
	width: min(560px, 92vw);
	max-width: 100%;
	background: #fff;
	padding: 24px;
	box-sizing: border-box;
}
.podcast-lightbox__player { width: 100%; }
.podcast-lightbox__audio { display: none; } /* 表示はカスタム UI（.podcast-player）に任せる */

/* カスタムオーディオプレーヤー */
.podcast-player {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
}

/* 上段：サムネ＋タイトル */
.podcast-player__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.podcast-player__thumb {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	object-fit: cover;
	background: #f7f7f7;
	border: 1px solid #ddd;
	display: block;
}
.podcast-player__titles {
	flex: 1 1 auto;
	min-width: 0;
}
.podcast-player__title {
	margin: 0;
	font-weight: 700;
	line-height: 1.4;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	word-break: break-word;
}

/* 中段：再生速度・スキップ・再生 */
.podcast-player__controls {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
}
.podcast-player__rate {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	width: auto !important;
	min-width: 44px;
	height: 32px;
	padding: 0 10px !important;
	font-size: 0.9em;
	font-weight: 700;
	background: transparent !important;
	color: #003f88 !important;
	border: 1px solid #003f88 !important;
	border-radius: 16px !important;
	cursor: pointer;
	line-height: 1;
	transition: background 0.2s, color 0.2s;
}
@media (hover: hover) and (pointer: fine) {
	.podcast-player__rate:hover {
		background: #003f88 !important;
		color: #fff !important;
	}
}
.podcast-player__skip {
	position: relative;
	width: 66px;
	height: 66px;
	padding: 0 !important;
	background: transparent !important;
	color: #003f88 !important;
	border: 0 !important;
	border-radius: 0 !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 33px;
	line-height: 1;
}
@media (hover: hover) and (pointer: fine) {
	.podcast-player__skip:hover { color: #002a5a !important; background: transparent !important; }
}
.podcast-player__skip-num {
	position: absolute;
	left: 0; right: 0; top: 50%;
	transform: translateY(-50%);
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	pointer-events: none;
}
.podcast-player__playbtn {
	width: 56px;
	height: 56px;
	border-radius: 50% !important;
	background: #003f88;
	color: #fff;
	border: 0;
	padding: 0 !important;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	transition: background 0.2s;
}
@media (hover: hover) and (pointer: fine) {
	.podcast-player__playbtn:hover {
		background: #002a5a;
		color: #fff;
	}
}
.podcast-player__playbtn .fa-play { padding-left: 4px; }

/* 下段：進捗 */
.podcast-player__progress {
	display: flex;
	align-items: center;
	gap: 10px;
}
.podcast-player__time {
	flex: 0 0 auto;
	min-width: 3em;
	font-size: 0.85em;
	color: #888;
	font-variant-numeric: tabular-nums;
}
.podcast-player__time--current { text-align: right; }
.podcast-player__time--total { text-align: left; }
.podcast-player__seek {
	flex: 1 1 auto;
	-webkit-appearance: none;
	appearance: none;
	height: 4px;
	background: linear-gradient(to right,
		#003f88 0%,
		#003f88 var(--fill, 0%),
		#ddd var(--fill, 0%),
		#ddd 100%);
	outline: none;
	cursor: pointer;
	margin: 0;
}
.podcast-player__seek::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #003f88;
	border: 0;
	cursor: pointer;
}
.podcast-player__seek::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #003f88;
	border: 0;
	cursor: pointer;
}

@media (max-width: 768px) {
	/* 「テキスト」ボタンが MP3 より幅広いため、15秒スキップを左右それぞれ再生ボタン側へ寄せて重なりを防ぐ（base に倣う：既定 20px → 0） */
	.podcast-player__controls { gap: 0; }
	.podcast-player__playbtn { width: 52px; height: 52px; font-size: 18px; }
	.podcast-player__skip { width: 60px; height: 60px; font-size: 30px; }
	.podcast-player__skip-num { font-size: 12px; }
	.podcast-player__thumb { width: 60px; height: 60px; }
	.podcast-player__time { font-size: 0.8em; min-width: 2.6em; }
	.podcast-lightbox .lightbox-content { max-width: 92%; width: 92%; }
	.podcast-lightbox .podcast-lightbox__frame { width: 100%; padding: 16px; }
	.podcast-lightbox .close-button { left: calc(50% - 20px); }
}

/* キーボード操作位置を明示（モーダル内）。:focus ではなく :focus-visible を使い、
   マウス/タップ操作では枠を出さず、キーボード操作（Tab 等）のときだけ表示する。
   閉じるボタンは見た目を揃えるため除外し、共通の .close-button:focus-visible に任せる。 */
#podcast-lightbox.active :is(a[href], button, input, [tabindex]):not(.close-button):focus-visible {
	outline: 3px solid #003f88;
	outline-offset: 2px;
	box-shadow: 0 0 0 2px #fff;
}

/* MP3 ダウンロード（コントロール行の右端。再生速度ボタンと同デザイン。色は #003f88/#fff 固定） */
.podcast-player__download {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	min-width: 44px;
	height: 32px;
	padding: 0 10px;
	display: inline-flex; align-items: center; justify-content: center; gap: 5px;
	font-size: 0.9em;
	font-weight: 700;
	line-height: 1;
	color: #003f88;
	background: transparent;
	border: 1px solid #003f88;
	border-radius: 16px;
	text-decoration: none !important; /* グローバル .wrapper a:hover 等の下線を打ち消す（タッチ含む） */
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
@media (hover: hover) and (pointer: fine) {
	.podcast-player__download:hover {
		background: #003f88;
		color: #fff;
		text-decoration: none;
	}
}

/* MP3 ダウンロードボタン：機能は残し UI のみ隠す（再有効化はこの display 行を外す） */
.podcast-player__download { display: none; }

/* コントロール行右端の「テキスト」ボタン（旧 MP3 ダウンロードと同デザイン・同位置） */
.podcast-player__transcript {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	min-width: 44px;
	height: 32px;
	padding: 0 10px;
	display: inline-flex; align-items: center; justify-content: center; gap: 5px;
	font-size: 0.9em;
	font-weight: 700;
	line-height: 1;
	color: #003f88;
	background: transparent;
	border: 1px solid #003f88;
	border-radius: 16px;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.podcast-player__transcript[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
	.podcast-player__transcript:hover {
		background: #003f88;
		color: #fff;
		text-decoration: none;
	}
}
