/*!
 * RCA メインスライダー：切り替えの動きと、矢印・ドットの見た目
 * 置き場所（レイアウト）はテーマの sass/object/project/_top.scss 側で決める
 */

/* ---------- フェード（全スライドを同じ場所に重ね、表示中だけ見せる） ---------- */
.rca-ms__slide {
	display: contents;
}
.rca-ms__slide > *,
.rca-ms__bg {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}
.rca-ms__slide.is-active > *,
.rca-ms__bg.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.8s ease, visibility 0s linear 0s;
}

/* ---------- 矢印 ---------- */
.rca-ms__arrow {
	-webkit-appearance: none;
	appearance: none;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	box-shadow: 0 2px 8px rgba(51, 74, 170, 0.18);
	cursor: pointer;
	position: relative;
	transition: background-color 0.2s ease;
}
.rca-ms__arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border-top: 2px solid #334AAA;
	border-right: 2px solid #334AAA;
	transform: translate(-65%, -50%) rotate(45deg);
}
.rca-ms__arrow--prev::before {
	transform: translate(-35%, -50%) rotate(-135deg);
}
.rca-ms__arrow:hover {
	background: #fff;
}

/* ---------- ドット ---------- */
.rca-ms__dots {
	display: flex;
	gap: 4px;
	justify-content: center;
	align-items: center;
}
.rca-ms__dot {
	-webkit-appearance: none;
	appearance: none;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	position: relative;
}
.rca-ms__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #334AAA;
	transform: translate(-50%, -50%);
	transition: background-color 0.2s ease;
}
.rca-ms__dot.is-active::before {
	background: #334AAA;
}

.rca-ms__arrow:focus-visible,
.rca-ms__dot:focus-visible {
	outline: 3px solid #3A92E6;
	outline-offset: 2px;
}

/* ---------- 動きを減らす設定のとき：アニメーションなし ---------- */
@media (prefers-reduced-motion: reduce) {
	.rca-ms__slide > *,
	.rca-ms__slide.is-active > *,
	.rca-ms__bg,
	.rca-ms__bg.is-active,
	.rca-ms__arrow,
	.rca-ms__dot::before {
		transition: none;
	}
}
