/**
 * PDP レビュー（WooCommerce 標準）の意匠。
 *
 * フェーズ2: 星＝タイトル直下(SVG自前) / 一覧＝Swiper カルーセル / フォーム＝モーダル。
 * マークアップは woocommerce/single-product-reviews.php と inc/reviews.php が出す。
 */

.mm-reviews {
	font-size: 13px;
	margin: 0 0 20px;
	min-width: 0;
}

/* details を開いたときにページ全体が横に伸びるのを防ぐ。
   Swiper は全スライドを横一列に並べる（18件なら 5,400px 超）ため、
   グリッドアイテムである .product__info-wrapper の「自動最小サイズ」
   （min-width: auto = 中身の min-content）がその幅まで膨らみ、
   1カラムになるモバイルではトラックごと引き伸ばされて余白が真っ白になる。
   min-width: 0 でアイテムを縮められるようにすると、.swiper の
   overflow: hidden が効いてカルーセルが親幅に収まる。
   PC で 2 カラムのときは列幅が % 指定なので、この指定は見た目に影響しない。 */
.mymoods-pdp .product__info-wrapper,
.mymoods-pdp .product__media-wrapper {
	min-width: 0;
}

.mm-reviews__carousel {
	min-width: 0;
	max-width: 100%;
}

/* 「商品レビュー 詳細はこちら」の ▶ を、details が開いているとき 90deg 回して ▼ にする。
   ベースの指定は mymoods-overrides.css:170。inline のままだと transform が効かないので
   inline-block にする。content の末尾スペースも一緒に回ってしまうため、
   スペースは content から外して margin で取る。 */
.mymoods-pdp .product__review-link::before {
	content: "▶";
	display: inline-block;
	margin-right: .3em;
	transition: transform .2s ease;
}

.mymoods-pdp details[open] > .product__review-link::before {
	transform: rotate(90deg);
}

/* 星（.mm-stars）の基本意匠は商品カードと共通なので mymoods-stars.css（全ページ）にある。 */

/* =========================================================================
 * 商品タイトル直下のサマリー
 * ====================================================================== */

.mm-review-summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0 10px;
	font-size: 13px;
	color: #222;
	text-decoration: none;
}

.mm-review-summary:hover .mm-review-summary__count {
	text-decoration: underline;
}

.mm-review-summary__count {
	color: #555;
}

/* =========================================================================
 * 一覧の見出し行
 * ====================================================================== */

.mm-reviews__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 12px;
}

.mm-reviews__summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.mm-reviews__count {
	color: #555;
}

.mm-reviews__count--empty {
	color: #888;
}

.mm-reviews__write {
	appearance: none;
	border: 1px solid #222;
	background: #fff;
	color: #222;
	border-radius: 999px;
	padding: 7px 16px;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}

.mm-reviews__write:hover {
	background: #222;
	color: #fff;
}

.mm-reviews__gate {
	margin: 8px 0 0;
	color: #666;
}

/* =========================================================================
 * カルーセル
 * ====================================================================== */

.mm-reviews__carousel {
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	padding: 14px;
}

.mm-review {
	height: auto;
	box-sizing: border-box;
}

.mm-review__rating {
	margin: 0 0 6px;
}

.mm-review__title {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.mm-review__body {
	margin: 0 0 8px;
	line-height: 1.8;
	color: #333;
}

.mm-review__body p {
	margin: 0 0 .6em;
}

.mm-review__body p:last-child {
	margin-bottom: 0;
}

.mm-review__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin: 0;
	font-size: 12px;
	color: #777;
}

.mm-review__author {
	font-weight: 600;
	color: #444;
}

.mm-review__badge {
	background: #eef4ff;
	color: var(--mymoods-blue, #2500c1);
	border-radius: 3px;
	padding: 2px 6px;
	font-size: 11px;
	line-height: 1.4;
}

.mm-review__pending {
	background: #fff4e5;
	color: #a35b00;
	border-radius: 3px;
	padding: 2px 6px;
	font-size: 11px;
	line-height: 1.4;
}

.mm-review--pending {
	opacity: .75;
}

.mm-reviews__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 10px 0 0;
}

.mm-reviews__arrow {
	appearance: none;
	border: 1px solid #ddd;
	background: #fff;
	color: #333;
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	box-sizing: border-box;
	border-radius: 50%;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mm-reviews__arrow:hover {
	border-color: #999;
}

.mm-reviews__arrow.swiper-button-disabled {
	opacity: .35;
	cursor: default;
}

.mm-reviews__pagination {
	font-size: 12px;
	color: #777;
	min-width: 48px;
	text-align: center;
}

/* =========================================================================
 * モーダル
 * ====================================================================== */

.mm-review-modal {
	border: 0;
	border-radius: 10px;
	padding: 0;
	width: min(92vw, 460px);
	background: #fff;
	color: #222;
	font-size: 13px;
}

.mm-review-modal::backdrop {
	background: rgba(0, 0, 0, .45);
}

.mm-review-modal__inner {
	position: relative;
	padding: 22px 20px 20px;
}

.mm-review-modal__close {
	position: absolute;
	top: 8px;
	right: 10px;
	appearance: none;
	border: 0;
	background: none;
	font-size: 22px;
	line-height: 1;
	color: #666;
	cursor: pointer;
}

.mm-review-modal__title {
	display: block;
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 600;
}

.mm-review-modal__status {
	margin: 10px 0 0;
	min-height: 1em;
}

.mm-review-modal__status.is-busy {
	color: #666;
}

.mm-review-modal__status.is-ok {
	color: #1a7f37;
}

.mm-review-modal__status.is-error {
	color: #b42318;
}

/* --- フォーム --- */

.mm-form__row {
	margin: 0 0 12px;
}

.mm-form__row label,
.mm-form__label {
	display: block;
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 600;
}

.mm-form__row input[type="text"],
.mm-form__row input[type="email"],
.mm-form__row textarea {
	box-sizing: border-box;
	width: 100%;
	border: 1px solid #ccc;
	border-radius: 4px;
	padding: 8px 10px;
	font-size: 13px;
	font-family: inherit;
}

.mm-form__row input:focus,
.mm-form__row textarea:focus {
	outline: 2px solid var(--mymoods-blue, #2500c1);
	outline-offset: -1px;
	border-color: transparent;
}

.mm-form__note {
	display: block;
	margin: 4px 0 0;
	font-size: 11px;
	color: #777;
	font-weight: 400;
}

.mm-form .required {
	color: #b42318;
}

.mm-form .form-submit {
	margin: 16px 0 0;
}

/* WooCommerce の `.woocommerce #respond input#submit`（ID 2 つ）に負けるため、
   同じ詳細度で書いて後勝ちさせる。単なる .mm-form input[type=submit] では効かない。 */
.mm-review-modal #respond input#submit,
.mm-review-modal #respond input#submit:hover {
	appearance: none;
	width: 100%;
	border: 0;
	border-radius: 999px;
	background: #222;
	color: #fff;
	padding: 11px 16px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
}

.mm-review-modal #respond input#submit:hover {
	background: #444;
}

.mm-review-modal #respond input#submit:disabled {
	opacity: .5;
	cursor: default;
}

/* ハニーポット: 人間には見せない。display:none だと埋めないボットがいるので隠し方を変える。 */
.mm-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- 星のラジオ --- */

/* マークアップは 5→1 の順。row-reverse にすることで
   「ホバー中の星とその左側」を ~ セレクタで塗れる。 */
.mm-rating {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 2px;
}

.mm-rating input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.mm-rating label {
	margin: 0;
	line-height: 0;
	color: #d8d8d8;
	cursor: pointer;
	transition: color .12s ease;
}

.mm-rating__star {
	fill: currentColor;
	width: 22px;
	height: 22px;
}

.mm-rating label:hover,
.mm-rating label:hover ~ label,
.mm-rating input:checked ~ label {
	color: #f5b301;
}

.mm-rating input:focus-visible + label {
	outline: 2px solid var(--mymoods-blue, #2500c1);
	outline-offset: 2px;
}
