/**
 * WordPress テーマとの共存用 オーバーライド・追加スタイル
 *
 * theme.css のあとに読み込まれる。テーマ固有の干渉を回避するための調整。
 */

/* WordPressテーマがcontainerなどに余白を付けることがあるので、mirais-themeでは中和 */
.mirais-theme {
	margin: 0 !important;
	padding: 0 !important;
}

/* mirais-theme 内のリスト・パラグラフのデフォルトマージンをクリーンに */
.mirais-theme ul,
.mirais-theme ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mirais-theme h1,
.mirais-theme h2,
.mirais-theme h3,
.mirais-theme h4,
.mirais-theme h5,
.mirais-theme h6 {
	margin: 0;
}

.mirais-theme p {
	margin: 0;
}

/* WPテーマがbuttonに枠線を付けることがあるので除去
   v1.31.40: background は指定しない。background:transparent を入れると
   .dmr-submit / .vcr-auth-btn 等プラグイン側のボタン背景色まで打ち消してしまい
   (.mirais-theme button = 0,1,1 が単一クラス 0,1,0 に勝つため)、ボタンが白く見えなくなる。 */
.mirais-theme button {
	border: none;
	cursor: pointer;
	font-family: inherit;
}

/* WordPress テーマで wp-block-image などがあった場合の干渉を防ぐ */
.mirais-theme img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ===== モバイル ハンバーガーメニュー ===== */

.mirais-theme .hamburger {
	/* v1.170.10: ☰を全幅で常時表示。横ナビは廃止しパネル(.site-nav)を☰で開く方式に統一。
	   （以前ここの display:none が後勝ちでPCの☰を消していた） */
	display: block;
}

@media (max-width: 900px) {
	.mirais-theme .hamburger {
		display: block;
		background: transparent;
		border: none;
		padding: 8px;
		font-size: 22px;
	}
	/* v1.154.0: 旧ドロワー指定(.site-nav absolute / .site-nav.open)は撤去。
	   ☰ドロワーは theme.css の右スライド方式(.site-header.nav-open .site-nav)に一本化する。
	   （ここに残っていた旧指定が後勝ちで新方式を打ち消し、ハンバーガーが開かなかった） */
	.mirais-theme .header-actions {
		gap: 6px;
	}
	.mirais-theme .lang-switcher,
	.mirais-theme .currency-switcher {
		display: none;
	}
}

/* ===== コンタクト・チャットボックス(下部チャネル選択) ===== */

.mirais-theme .contact-channels {
	max-width: 1200px;
	margin: 0 auto;
	padding: 60px 20px;
}

.mirais-theme .contact-channels-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.mirais-theme .contact-channel {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 22px 18px;
	text-align: center;
	transition: all 0.2s;
	cursor: pointer;
}

.mirais-theme .contact-channel:hover {
	border-color: var(--primary);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.mirais-theme .contact-channel .icon {
	font-size: 32px;
	margin-bottom: 10px;
}

.mirais-theme .contact-channel .name {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.mirais-theme .contact-channel .desc {
	font-size: 11px;
	color: var(--text-sub);
}

/* v1.32.55: 電話カードをコンパクトに (番号を主役に・横の間延びを解消) */
.mirais-theme .contact-channels-grid--compact {
	max-width: 460px;
	margin-left: auto;
	margin-right: auto;
}
.mirais-theme .contact-channel-phone {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 16px 18px;
	text-align: center;
	transition: all 0.2s;
	cursor: pointer;
}
.mirais-theme .contact-channel-phone:hover {
	border-color: var(--primary);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}
.mirais-theme .contact-channel-phone .cc-phone-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text-sub);
	margin-bottom: 2px;
}
.mirais-theme .contact-channel-phone .cc-phone-number {
	font-size: 26px;
	font-weight: 800;
	color: var(--primary);
	letter-spacing: 0.5px;
	line-height: 1.25;
	white-space: nowrap; /* v1.137.0: 番号が桁の途中で折り返さないように */
}
/* v1.137.0: スマホ等の狭い幅では番号を少し縮小して1行を保つ */
@media (max-width: 480px) {
	.mirais-theme .contact-channel-phone .cc-phone-number {
		font-size: 22px;
		letter-spacing: 0.3px;
	}
}
.mirais-theme .contact-channel-phone .cc-phone-hours {
	font-size: 12px;
	color: var(--text-sub);
	margin-top: 2px;
}

/* ===== ライブチャットフローティングボタン ===== */

.mirais-theme-chat-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	background: var(--accent, #00A3B4);
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 163, 180, 0.4);
	z-index: 9999;
	border: none;
	transition: transform 0.2s;
}

.mirais-theme-chat-btn:hover {
	transform: scale(1.08);
}

/* ===== ヒーロー検索フォームのスマホ調整 ===== */
@media (max-width: 768px) {
	.mirais-theme .hero {
		padding: 50px 16px 70px;
	}
	.mirais-theme .hero h1 {
		font-size: 28px;
	}
	.mirais-theme .hero .sub {
		font-size: 14px;
	}
	.mirais-theme .hero-search {
		padding: 18px;
	}
	.mirais-theme .search-row {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.mirais-theme .search-btn {
		width: 100%;
	}
	.mirais-theme .section {
		padding: 50px 16px;
	}
	.mirais-theme .section-head h2 {
		font-size: 22px;
	}
	.mirais-theme .features-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
	.mirais-theme .car-grid {
		grid-template-columns: 1fr;
	}
	.mirais-theme .reviews-grid {
		grid-template-columns: 1fr;
	}
	.mirais-theme .cta-section {
		padding: 50px 16px;
	}
	.mirais-theme .cta-section h2 {
		font-size: 22px;
	}
	.mirais-theme .footer-cols {
		grid-template-columns: 1fr 1fr;
		gap: 24px;
	}
}

/* ===== 既存 .mirais-app CSS との共存 ===== */
/* 古い予約フォームUIは別CSS(reserve.css)で管理。.mirais-theme と .mirais-app は別系統で動く */


/* ===== v0.8.0 追加スタイル ===== */

/* FAQ details/summary をクリックしやすく */
.mirais-theme .faq-item {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
}

.mirais-theme .faq-item summary {
	padding: 16px 20px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 500;
	font-size: 14px;
	color: var(--text);
	list-style: none;
}

.mirais-theme .faq-item summary::-webkit-details-marker {
	display: none;
}

.mirais-theme .faq-item summary .arr {
	color: var(--primary);
	transition: transform 0.2s;
	flex-shrink: 0;
	font-size: 12px;
}

.mirais-theme .faq-item[open] summary .arr {
	transform: rotate(180deg);
}

.mirais-theme .faq-item summary:hover {
	background: var(--bg-alt);
}

.mirais-theme .faq-a {
	padding: 0 20px 18px;
	font-size: 13px;
	line-height: 1.85;
	color: var(--text-sub);
	border-top: 1px solid var(--bg-alt);
	padding-top: 14px;
	margin-top: 4px;
}

/* タブを a タグでも適用できるように */
.mirais-theme .car-class-tabs a {
	padding: 9px 18px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 24px;
	font-size: 13px;
	color: var(--text);
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: all 0.2s;
}

.mirais-theme .car-class-tabs a.active {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

.mirais-theme .car-class-tabs a:hover:not(.active) {
	border-color: var(--primary);
	color: var(--primary);
}

/* 会社概要テーブル */
.mirais-theme .company-table th {
	vertical-align: top;
}

@media (max-width: 768px) {
	.mirais-theme .company-table th {
		display: block;
		width: 100% !important;
		text-align: left;
		padding-bottom: 4px !important;
	}
	.mirais-theme .company-table td {
		display: block;
		width: 100%;
		padding-top: 0 !important;
	}
	.mirais-theme .store-grid {
		grid-template-columns: 1fr !important;
	}
}

/* ===== v1.3.0 / v1.32.6: オプション写真表示 =====
   写真ありのオプションは縦カード (写真を上に大きく、情報を下に)。 */
.mirais-theme .option-item.has-photo {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 0;
	gap: 0;
	overflow: hidden;
	border: 1px solid var(--border);
}

.mirais-theme .option-item.has-photo .opt-photo {
	position: relative;
	width: 100%;
	height: 200px;
	border-radius: 0;
	overflow: hidden;
	cursor: pointer;
	background: #fff;
	border: 0;
	box-shadow: none;
}

.mirais-theme .option-item.has-photo .opt-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* v1.32.86: 子供用品など縦長の商品は contain で全体を表示する。
   横長枠に縦長画像が入るため左右に余白が出る。
   v1.32.88: 余白の背景は白に統一 (.opt-photo の白背景をそのまま使う)。 */
.mirais-theme .option-item.has-photo .opt-photo--contain img {
	object-fit: contain;
}

.mirais-theme .option-item.has-photo .opt-body {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px;
	position: relative; /* v1.41.4: 価格を絶対配置するための基準 */
}

.mirais-theme .option-item.has-photo .opt-body input[type=checkbox] {
	width: 20px;
	height: 20px;
	cursor: pointer;
	flex-shrink: 0;
	margin-top: 2px;
}

.mirais-theme .option-item.has-photo .opt-body .opt-info {
	flex: 1;
	min-width: 0;
}

.mirais-theme .option-item.has-photo .opt-body .opt-name {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 4px;
	padding-right: 84px; /* v1.41.4: 右上の価格に重ならないよう名前だけ余白確保 */
}

.mirais-theme .option-item.has-photo .opt-body .opt-desc {
	font-size: 12px;
	color: var(--text-sub);
	line-height: 1.6;
}

/* v1.41.4: 価格は右上に絶対配置。説明文・対応ホテル一覧は右端まで使える。 */
.mirais-theme .option-item.has-photo .opt-body .opt-price {
	position: absolute;
	top: 14px;
	right: 14px;
	font-size: 15px;
	font-weight: 700;
	color: var(--primary);
	flex-shrink: 0;
	white-space: nowrap;
}

.mirais-theme .option-item.has-photo .opt-body .opt-price.free {
	color: var(--success);
}

/* モバイル: 写真の高さを少し抑える */
@media (max-width: 480px) {
	.mirais-theme .option-item.has-photo .opt-photo {
		height: 170px;
	}
}

/* v1.34.50: オプションのコンパクト化。写真を小さく、余白・文字を詰める。
   スマホで縦に長くなりすぎる問題への対応。 */
.mirais-theme .option-item.opt-compact.has-photo .opt-photo {
	height: 130px;
}
.mirais-theme .option-item.opt-compact.has-photo .opt-body {
	padding: 10px 12px;
	gap: 10px;
}
.mirais-theme .option-item.opt-compact.has-photo .opt-body .opt-name {
	font-size: 14px;
	margin-bottom: 2px;
}
.mirais-theme .option-item.opt-compact.has-photo .opt-body .opt-desc {
	font-size: 11.5px;
	line-height: 1.45;
}
/* v1.41.2: 2行省略は .opt-desc-clamp が付いている時だけ（展開時は全文表示） */
.mirais-theme .option-item.opt-compact.has-photo .opt-body .opt-desc.opt-desc-clamp {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
@media (max-width: 480px) {
	.mirais-theme .option-item.opt-compact.has-photo .opt-photo {
		height: 110px;
	}
}

/* 選択済みオプションの強調 (緑枠+薄緑背景はインラインstyleで付与、ここは補助) */
.mirais-theme .option-item.opt-selected {
	box-shadow: 0 2px 8px rgba(99,153,34,0.18);
}

/* v1.159.0: 複数可オプションの数量ステッパー (パターンA: − N ＋)。
   価格はこのカードだけ絶対配置を解除し、右側に「価格 / ステッパー」を縦に並べる。 */
.mirais-theme .option-item.opt-multi .opt-body .opt-price { position: static; top: auto; right: auto; }
.mirais-theme .option-item.opt-multi .opt-body .opt-name { padding-right: 8px; }
.mirais-theme .option-item.opt-multi .opt-qtywrap {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}
.mirais-theme .mr-opt-stepper {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid var(--border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}
.mirais-theme .mr-opt-stepper.act { border-color: var(--primary); }
.mirais-theme .mr-opt-stepper button {
	width: 34px;
	height: 34px;
	border: 0;
	background: #fff;
	font-size: 18px;
	line-height: 1;
	font-weight: 700;
	color: var(--primary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.mirais-theme .mr-opt-stepper button:disabled { color: #CBD3DE; cursor: not-allowed; }
.mirais-theme .mr-opt-stepper .v {
	min-width: 32px;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--text);
}
.mirais-theme .mr-opt-stepper .v.z { color: #AEB8C7; }
@media (max-width: 480px) {
	.mirais-theme .mr-opt-stepper button { width: 30px; height: 30px; font-size: 16px; }
	.mirais-theme .mr-opt-stepper .v { min-width: 28px; font-size: 14px; }
}
