/**
 * マイページ スタイルシート
 *
 * シンプルで壊れにくい独自スタイル
 */

/* ================================
   基本設定
================================ */
.mitsukaru-mypage-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	font-size: 16px;
	line-height: 1.6;
	color: #3c3c3c;
}

.mitsukaru-mypage-wrapper * {
	box-sizing: border-box;
}

/* ================================
   ウェルカムメッセージ
================================ */
.mypage-welcome {
	background-color: #fff7ed;
	border: 2px solid var(--pointColor, #ff7830);
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 32px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

@media (min-width: 768px) {
	.mypage-welcome {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

.welcome-info {
	flex: 1;
}

.welcome-company {
	font-size: 14px;
	color: #6b7280;
	margin: 0 0 4px 0;
	text-align: left;
}

.welcome-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0;
	color: #3c3c3c;
	text-align: left;
}

.welcome-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* ================================
   ボタン
   - 共通スタイル・色・hover は shared プラグインの mitsukaru-buttons.css が管理する
     （.mitsukaru-btn / .mitsukaru-btn--primary / --secondary / --large）
   - ここではマイページ固有の配置調整のみ残す
================================ */

/* ================================
   タブナビゲーション
================================ */
.mypage-tabs {
	display: flex;
	border-bottom: 4px solid #d1d5db;
	margin-bottom: 32px;
}

.mypage-tab-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 32px;
	font-size: 18px;
	font-weight: 500;
	color: #6b7280;
	background: unset;
	border: none;
	border-bottom: 4px solid transparent;
	margin-bottom: -4px;
	cursor: pointer;
	transition: all 0.2s ease;
	border-radius: 0;
}

.mypage-tab-btn:hover {
	color: #3c3c3c;
	background: unset;
}

.mypage-tab-btn.active {
	color: var(--pointColor, #ff7830);
	font-weight: 700;
	border-bottom-color: var(--pointColor, #ff7830);
}

.mypage-tab-btn i {
	font-size: 16px;
}

/* ================================
   見積依頼履歴
================================ */
.quote-filter {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 24px;
}

@media (min-width: 768px) {
	.quote-filter {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

.quote-count {
	font-size: 16px;
	font-weight: 700;
}

.quote-count .count-number {
	font-size: 24px;
	color: var(--pointColor, #ff7830);
	margin: 0 4px;
}

.filter-controls {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* シェブロンは shared.css の .mitsukaru-select-chevron が描画（マークアップ側で併用） */
.mypage-select {
	padding: 10px 36px 10px 16px;
	font-size: 14px;
	border: 2px solid #d1d5db;
	border-radius: 6px;
	background-color: #ffffff;
	color: #3c3c3c;
	cursor: pointer;
	transition: border-color 0.2s ease;
	width: unset;
}

.mypage-select:focus {
	outline: none;
	border-color: var(--pointColor, #ff7830);
}

/* ================================
   テーブル
================================ */
.quote-table-wrapper {
	overflow-x: auto;
	margin-bottom: 32px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
}

.quote-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	text-align: left;
	background-color: #ffffff;
}

.quote-table thead th {
	background-color: #3c3c3c;
	color: #ffffff;
	padding: 15px;
	font-weight: 600;
	white-space: nowrap;
	border: 1px solid #6b7280;
}

.quote-table tbody td {
	padding: 15px;
	border: 1px solid #d1d5db;
	vertical-align: middle;
}

.quote-table thead th {
	vertical-align: middle;
}

.quote-table tbody tr:hover {
	background-color: #fff7ed;
}

.quote-table .empty-message {
	text-align: center;
	padding: 48px 15px;
	color: #6b7280;
	font-size: 16px;
}

/* 部品情報 */
.part-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.part-info .part-number {
	font-weight: 600;
	color: #333;
}

.part-info .part-detail {
	font-size: 12px;
	color: #666;
}

.part-info .more-items {
	font-size: 11px;
	color: #999;
	margin-top: 2px;
}

/* 詳細ボタン（オレンジ）
   色・hover は shared プラグインの .mitsukaru-btn--primary が管理。
   ここではテーブルセル内向けのサイズ・装飾のみ残す。 */
.btn-detail-orange {
	padding: 14px 24px;
	font-size: 14px;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	white-space: nowrap;
}

/* ================================
   ステータスバッジ
================================ */
.status-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 12px;
	border-radius: 15px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.status-badge i {
	font-size: 11px;
}

/* 見積依頼中（黄色） */
.status-requesting {
	background-color: #fff9c4;
	color: #827717;
	border: 1px solid #c9a700;
}

/* 未確認（赤） */
.status-unconfirmed {
	background-color: #ffebee;
	color: #c62828;
	border: 1px solid #c62828;
}

/* 注文済み（緑） */
.status-ordered {
	background-color: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #2e7d32;
}

/* 問い合わせ中（青） */
.status-inquiry {
	background-color: #e3f2fd;
	color: #1565c0;
	border: 1px solid #1565c0;
}

/* キャンセル（グレー） */
.status-cancelled {
	background-color: #f5f5f5;
	color: #757575;
	border: 1px solid #757575;
}

/* 有効期限切れ（オレンジ） */
.status-expired {
	background-color: #fff3e0;
	color: #e65100;
	border: 1px solid #e65100;
}

/* 見積不可（紫） */
.status-unavailable {
	background-color: #f3e5f5;
	color: #7b1fa2;
	border: 1px solid #7b1fa2;
}

/* ページネーションは shared の .mitsukaru-pagination に統合済み（pagination.css） */

/* ================================
   見積履歴 - 履歴なし
================================ */
.quote-history-empty {
	text-align: center;
	padding: 60px 20px;
	background: #f9f9f9;
	border-radius: 8px;
	margin-bottom: 24px;
}

.quote-history-empty p {
	color: #888;
	margin-bottom: 20px;
	font-size: 16px;
}

.quote-history-empty .mitsukaru-btn {
	display: inline-flex;
}

.quote-history-message {
	text-align: center;
	padding: 40px 20px;
	background: #fff3e0;
	border-radius: 8px;
	color: #f57c00;
}

/* 列スタイル */
.col-number {
    min-width: 140px;
}

.col-date {
    min-width: 100px;
}

.col-items {
    min-width: 150px;
}

.col-amount {
    min-width: 100px;
    text-align: right !important;
}

.col-status {
    min-width: 100px;
    text-align: center !important;
}

.col-deadline {
	color: var(--pointColor);
	font-weight: bold;
	font-size: 1.6rem;
	text-align: center;
}

.col-action {
    min-width: 80px;
    text-align: center !important;
}

.quote-number {
    font-weight: bold;
    color: #333;
}

.part-number {
    color: #333;
}

/* ================================
   見積詳細モーダル（ベース）
================================ */
.quote-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	/* iOS のアドレスバー/ホームインジケータ領域にモーダルが被らないようにする */
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
	box-sizing: border-box;
}

.quote-modal .modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.6);
}

.quote-modal .modal-content {
	position: relative;
	width: 98%;
	max-width: 1400px;
	/* vh は iOS の最大ビューポート基準のため、アドレスバー/タブバー表示時に
	   上下端(ヘッダー)がバーの裏に隠れる。dvh で可視領域基準にする */
	max-height: 98vh;
	max-height: 98dvh;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.125);
	display: flex;
	flex-direction: column;
}

/* ローディング・エラー表示 */
.quote-modal .modal-loading,
.quote-modal .modal-error {
	padding: 60px 40px;
	text-align: center;
	font-size: 1.4rem;
	color: #666;
}

.quote-modal .modal-error {
	color: #c62828;
	background: #ffebee;
}

/* モーダルが開いている時 */
body.modal-open {
	overflow: hidden;
}

/* ================================
   メッセージ表示
================================ */
.mitsukaru-success-message {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	border-radius: 4px;
	padding: 12px 20px;
	margin-bottom: 20px;
	color: #155724;
}

.mitsukaru-success-message p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
}

.mitsukaru-error-message {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	padding: 12px 20px;
	margin-bottom: 20px;
	color: #721c24;
}

.mitsukaru-error-message p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
}

/* ================================
   会員情報設定（登録フォームと同じスタイル）
================================ */
.form-container {
	padding: 36px 32px 46px;
	max-width: 1100px;
	margin: 0 auto;
}

.form-container-box {
	background-color: #f8f8f8;
	border-radius: 8px;
	padding: 38px 48px;
}

.section-title {
	font-size: 38px;
	font-weight: bold;
	color: #333;
	margin: 0 0 15px 0;
	padding-bottom: 18px;
	border-bottom: 2px solid #ddd;
	background-color: transparent;
	text-align: left;
}

/* フォーム行（2カラムレイアウト） */
.form-row {
	display: flex;
	border-bottom: 1px solid #ededed;
	padding: 18px 22px;
	align-items: center;
	min-height: 60px;
}

/* ラベル列（左側） */
.form-label {
	width: 200px;
	padding-right: 20px;
	flex-shrink: 0;
	padding-top: 8px;
}

.form-label label {
	font-size: 14px;
	font-weight: normal;
	color: #333;
	line-height: 1.6;
	display: block;
}

/* 必須マーク */
.required {
	background-color: #ffdede;
	color: #ff3130;
	font-size: 12px;
	padding: 2px 6px;
	border-radius: 2px;
	margin-left: 6px;
	font-weight: normal;
	display: inline-block;
	vertical-align: middle;
}

/* 入力欄列（右側） */
.form-input {
	flex: 1;
	min-width: 0;
}

/* 入力フィールド */
.form-input input[type="text"],
.form-input input[type="email"],
.form-input input[type="tel"],
.form-input input[type="password"],
.form-input select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 14px;
	background-color: white;
	transition: border-color 0.2s;
	box-sizing: border-box;
	line-height: 1.5;
}

.form-input input[type="text"]:focus,
.form-input input[type="email"]:focus,
.form-input input[type="tel"]:focus,
.form-input input[type="password"]:focus,
.form-input select:focus {
	outline: none;
	border-color: #f97316;
	box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.1);
}

.form-input input::placeholder {
	color: #aaa;
	font-size: 13px;
}

/* エラー表示（送信時バリデーションが挿入する .error スパン。
   共通コンポーネント側の form-fields.css と同じ配色） */
.form-input .error {
	display: block;
	color: #dc2626;
	font-size: 12px;
	margin-top: 5px;
}

.form-input input.error,
.form-input select.error {
	border-color: #dc2626;
}

/* 入力グループ（横並び） */
.input-group {
	display: flex;
	gap: 12px;
	align-items: center;
}

.input-half {
	flex: 1;
}

/* 郵便番号 */
.input-postal {
	width: 180px;
}

/* セレクトボックス（シェブロンは shared.css の .mitsukaru-select-chevron が描画。
   padding-right はシェブロン分の余白） */
.form-input select {
	background-color: white;
	padding-right: 44px;
	cursor: pointer;
	width: 100%;
	max-width: 100%;
}

/* チェックボックス */
.checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
	color: #333;
}

.checkbox-label input[type="checkbox"] {
	/* 新規登録フォーム(.mitsukaru-form-fields)と見た目を揃える */
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--pointColor, #ff7830);
	cursor: pointer;
}

/* フィールド注釈 */
.field-note {
	font-size: 12px;
	color: #888;
	margin: 5px 0 0 0;
	line-height: 1.4;
}

/* 送信ボタン */
.form-submit {
	padding: 25px 20px 5px;
	text-align: center;
}

.submit-button {
	background-color: #f97316;
	color: white;
	/* border 分を padding から差し引き、反転時もボタンサイズを変えない */
	border: 2px solid #f97316;
	border-radius: 5px;
	padding: 13px 68px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s;
	display: inline-block;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* 共通ボタン（mitsukaru-btn--primary）と同じ hover 反転 */
.submit-button:hover:not(:disabled),
.submit-button:focus:not(:disabled) {
	background-color: #fff;
	color: #f97316;
}

.submit-button:active {
	transform: scale(0.98);
}

/* ================================
   パスワード変更セクション
================================ */
.password-section {
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid #ddd;
}

.section-subtitle {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 12px 0;
	color: #333;
}

.section-text {
	font-size: 14px;
	color: #666;
	margin: 0;
	line-height: 1.6;
}

.link-text {
	color: #f97316;
	text-decoration: underline;
}

.link-text:hover {
	color: #ea580c;
}

/* ================================
   退会セクション
================================ */
.withdrawal-section {
	margin-top: 24px;
	text-align: center;
	padding-bottom: 20px;
}

.withdrawal-text {
	font-size: 14px;
	color: #666;
	margin: 0 0 12px 0;
	line-height: 1.6;
}

.link-withdrawal {
	/* テーマの a[href="#"] スムーススクロールを避けるため button 化。
	   見た目はテキストリンクに揃える */
	display: inline;
	padding: 0;
	border: none;
	background: none;
	font-family: inherit;
	cursor: pointer;
	font-size: 14px;
	color: #888;
	text-decoration: underline;
}

.link-withdrawal:hover {
	color: #666;
}

/* ================================
   レスポンシブ調整
================================ */
@media (max-width: 768px) {
	/* SPはテーマ側(.wrapCo)の余白があるため、ラッパー自身のpaddingは不要 */
	.mitsukaru-mypage-wrapper {
		padding: 0;
	}

	.mypage-welcome {
		padding: 16px;
	}

	.welcome-title {
		font-size: 20px;
		text-align: left;
	}

	/* SPはボタンが収まらず折り返してガタつくため、縦積み・全幅に統一 */
	.welcome-actions {
		flex-direction: column;
	}

	.welcome-actions .mitsukaru-btn {
		width: 100%;
	}

	.mypage-tab-btn {
		padding: 12px 16px;
		font-size: 16px;
	}

	/* 見積履歴: SPは6列が収まらないためカード型表示に変換 */
	.quote-table-wrapper {
		border: none;
		border-radius: 0;
	}

	.quote-table {
		font-size: 13px;
	}

	.quote-table thead {
		display: none;
	}

	.quote-table,
	.quote-table tbody,
	.quote-table tbody tr,
	.quote-table tbody td {
		display: block;
		width: 100%;
	}

	.quote-table tbody tr {
		background-color: #fff;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		padding: 4px 16px;
		margin-bottom: 12px;
	}

	.quote-table tbody td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 9px 0;
		border: none;
		border-bottom: 1px dashed #e0e0e0;
		text-align: right;
	}

	.quote-table tbody tr td:last-child {
		border-bottom: none;
	}

	.quote-table tbody td::before {
		flex-shrink: 0;
		font-weight: 600;
		color: #666;
		text-align: left;
	}

	.quote-table td.col-date::before { content: "依頼日"; }
	.quote-table td.col-number::before { content: "見積番号"; }
	.quote-table td.col-status::before { content: "ステータス"; }
	.quote-table td.col-items::before { content: "部品情報"; }
	.quote-table td.col-deadline::before { content: "見積有効期限"; }

	/* 操作ボタンはラベルなしで全幅 */
	.quote-table td.col-action {
		display: block;
		padding: 12px 0 8px;
	}

	.quote-table td.col-action .btn-detail {
		width: 100%;
	}

	/* フォームのレスポンシブ */
	.form-container {
		padding: 20px 10px 30px;
	}

	.form-container-box {
		padding: 20px;
	}

	.section-title {
		font-size: 28px;
	}

	.form-row {
		flex-direction: column;
		padding: 15px;
		align-items: flex-start;
	}

	.form-label {
		width: 100%;
		padding-right: 0;
		margin-bottom: 8px;
		padding-top: 0;
	}

	.form-input {
		width: 100%;
	}

	.input-group {
		flex-wrap: wrap;
	}

	.input-half {
		min-width: 120px;
	}

	.form-input select {
		width: 100%;
	}

	.input-postal {
		width: 100%;
		max-width: 200px;
	}

	.submit-button {
		width: 100%;
		max-width: 300px;
	}

	/* ページネーションのレスポンシブは shared の pagination.css に統合済み */

	/* モーダル */
	.info-row {
		flex-direction: column;
		gap: 5px;
	}

	.info-label {
		width: auto;
	}

	.quote-detail-actions {
		flex-direction: column;
	}

	.btn-order,
	.btn-inquiry {
		width: 100%;
		justify-content: center;
	}

	.items-table {
		font-size: 13px;
	}

	.items-table th,
	.items-table td {
		padding: 8px 10px;
	}
}

@media (max-width: 480px) {
	.submit-button {
		/* border 2px 分を差し引く（サイズは従来どおり） */
		padding: 12px 38px;
		font-size: 15px;
	}
}

/* ================================
   見積詳細モーダル（モックアップデザイン）
================================ */

/* --- モーダルヘッダー（ダークグレー） --- */
.quote-modal .modal-header {
	background-color: #3c3c3c;
	color: #fff;
	padding: 20px 30px;
	border-radius: 12px 12px 0 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.quote-modal .modal-header h3 {
	font-size: 2rem;
	font-weight: 700;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.quote-modal .modal-header h3 i {
	margin-right: 8px;
}

.quote-modal .modal-header .modal-quote-number {
	font-weight: normal;
	font-size: 1.6rem;
	color: #d1d5db;
}

.quote-modal .modal-header .modal-close {
	position: static;
	width: auto;
	height: auto;
	background: none;
	border: none;
	color: #fff;
	font-size: 2.8rem;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.quote-modal .modal-header .modal-close:hover {
	opacity: 1;
	color: #fff;
}

/* --- モーダルヘッダー ステータスバッジ --- */
.quote-modal .modal-status-badge {
	display: inline-block;
	font-size: 1.3rem;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 20px;
	margin-left: 12px;
	vertical-align: middle;
}

.quote-modal .modal-status-badge.status-ordered {
	background-color: #d1fae5;
	color: #065f46;
}

.quote-modal .modal-status-badge.status-unconfirmed {
	background-color: #fee2e2;
	color: #991b1b;
}

.quote-modal .modal-status-badge.status-inquiry {
	background-color: #dbeafe;
	color: #1e40af;
}

.quote-modal .modal-status-badge.status-cancelled {
	background-color: #e5e7eb;
	color: #4b5563;
}

.quote-modal .modal-status-badge.status-requesting {
	background-color: #fef3c7;
	color: #92400e;
}

.quote-modal .modal-status-badge.status-expired {
	background-color: #ffedd5;
	color: #c2410c;
}

.quote-modal .modal-status-badge.status-unavailable {
	background-color: #f3e8ff;
	color: #7c3aed;
}

/* --- モーダルボディ（2カラム） --- */
.quote-modal .modal-body {
	padding: 40px;
	display: flex;
	align-items: flex-start;
	overflow-y: auto;
	gap: 40px;
	background-color: #fff;
	flex: 1;
}

.quote-modal .modal-left {
	flex: 1;
	min-width: 0;
}

.quote-modal .modal-right {
	width: 550px;
	flex-shrink: 0;
}

/* --- セクション --- */
.quote-modal .detail-section {
	margin-bottom: 24px;
}

.quote-modal .detail-section:last-child {
	margin-bottom: 0;
}

.quote-modal .detail-section-title {
	font-size: 1.6rem;
	font-weight: 700;
	color: #3c3c3c;
	margin: 0 0 16px 0;
	padding-bottom: 8px;
	border-bottom: 3px solid #3c3c3c;
	text-align: left;
}

/* --- 依頼内容テーブル --- */
.quote-modal .request-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1.4rem;
}

.quote-modal .request-table th {
	background-color: #3c3c3c;
	color: #fff;
	padding: 12px 15px;
	border: 1px solid #3c3c3c;
	font-weight: 500;
	text-align: left;
}

.quote-modal .request-table td {
	background-color: #fff;
	padding: 12px 15px;
	border: 1px solid #d1d5db;
}

.quote-modal .request-table tr:hover td {
	background-color: #fef3c7;
}

.quote-modal .request-table-wrapper {
	overflow-x: auto;
	margin-bottom: 8px;
}

.quote-modal .request-table .col-part {
	font-weight: 600;
	/* 長い型番がセルを横に伸ばしモーダル枠を貫通するのを防ぐ */
	white-space: normal;
	word-break: break-all;
	max-width: 240px;
}

.quote-modal .request-table .col-quantity {
	text-align: right;
	white-space: nowrap;
}

.quote-modal .request-table .col-price {
	text-align: right;
	white-space: nowrap;
}

.quote-modal .request-table .col-comment {
	min-width: 120px;
	max-width: 200px;
	font-size: 1.2rem;
	line-height: 1.5;
}

/* --- ショップコメント --- */
.quote-modal .shop-comment {
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px;
	font-size: 1.4rem;
	color: #374151;
	line-height: 1.8;
	text-align: left;
}

.quote-modal .shop-comment.user-comment-box {
	background-color: #fff7ed;
	border-color: #fed7aa;
}

/* --- 見積期限表示 --- */
.quote-modal .deadline-display {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background-color: #f9fafb;
	border-radius: 4px;
}

.quote-modal .deadline-label {
	font-size: 1.3rem;
	color: #6b7280;
}

.quote-modal .deadline-date {
	font-size: 1.4rem;
	font-weight: 600;
	color: #374151;
}

/* --- 注意事項チェックボックス --- */
.quote-modal .agreement-box {
	background-color: #fef3c7;
	border: 2px solid #f59e0b;
	border-radius: 8px;
	padding: 16px;
	margin-top: 20px;
	text-align: left;
}

.quote-modal .agreement-box label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.3rem;
	color: #92400e;
	cursor: pointer;
}

.quote-modal .agreement-box label span {
	text-align: left;
}

.quote-modal .agreement-box input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	flex-shrink: 0;
}

/* --- PDF プレビュー --- */
.quote-modal .pdf-preview {
	border: 3px solid #3c3c3c;
	border-radius: 8px;
	background-color: #fff;
	height: 650px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.quote-modal .pdf-header {
	background-color: #3c3c3c;
	color: #fff;
	padding: 12px 16px;
	font-size: 1.8rem;
	font-weight: 700;
	text-align: center;
}

.quote-modal .pdf-body {
	flex: 1;
	padding: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.quote-modal .pdf-body .pdf-iframe {
	width: 100%;
	height: 100%;
	border: none;
}

.quote-modal .pdf-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #9ca3af;
	text-align: center;
	padding: 40px;
}

.quote-modal .pdf-placeholder i {
	font-size: 4rem;
	margin-bottom: 16px;
	color: #d1d5db;
}

.quote-modal .pdf-placeholder p {
	font-size: 1.4rem;
	margin: 0;
	color: #9ca3af;
}

.quote-modal .pdf-btn-wrapper {
	text-align: center;
	margin-top: 12px;
}

.quote-modal .btn-pdf {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: #ef4444;
	color: #fff;
	font-size: 1.4rem;
	font-weight: 700;
	padding: 12px 24px;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.2s;
}

.quote-modal .btn-pdf:hover {
	background-color: #dc2626;
	color: #fff;
}

/* --- モーダルフッター --- */
.quote-modal .modal-footer {
	padding: 20px 30px;
	background-color: #f9fafb;
	border-top: 1px solid #e5e7eb;
	border-radius: 0 0 12px 12px;
}

.quote-modal .modal-footer-buttons {
	display: flex;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}

/* --- アクションボタン --- */
.quote-modal .btn-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 1.5rem;
	font-weight: 700;
	padding: 10px 30px;
	border-radius: 8px;
	border: 2px solid;
	cursor: pointer;
	transition: all 0.2s;
}

.quote-modal .btn-action i {
	font-size: 1.3rem;
}

/* .btn-action-primary の通常色・hoverは shared プラグインの
   .mitsukaru-btn--primary が管理。disabled状態のみここで保持。 */
.quote-modal .btn-action-primary:disabled,
.quote-modal .btn-action-primary.disabled {
	background-color: #9ca3af;
	border-color: #9ca3af;
	color: #fff;
	cursor: not-allowed;
	opacity: 0.7;
}

.quote-modal .btn-action-secondary {
	background-color: #fff;
	border-color: #3c3c3c;
	color: #3c3c3c;
}

.quote-modal .btn-action-secondary:hover {
	background-color: #f3f4f6;
}

.quote-modal .btn-action-danger {
	background-color: #fff;
	border-color: #ef4444;
	color: #ef4444;
}

.quote-modal .btn-action-danger:hover:not(:disabled) {
	background-color: #fef2f2;
}

.quote-modal .btn-action-danger:disabled,
.quote-modal .btn-action-danger.disabled {
	background-color: #f3f4f6;
	border-color: #9ca3af;
	color: #9ca3af;
	cursor: not-allowed;
	opacity: 0.7;
}

.quote-modal .btn-action-requote {
	background-color: #fff;
	border-color: #3b82f6;
	color: #3b82f6;
}

.quote-modal .btn-action-requote:hover {
	background-color: #eff6ff;
}

/* --- フッター注意書き --- */
.quote-modal .modal-footer-note {
	text-align: center;
	margin-top: 12px;
}

.quote-modal .modal-footer-note p {
	font-size: 1.2rem;
	color: #6b7280;
	margin: 0;
}

.quote-modal .modal-footer-note i {
	margin-right: 4px;
}

/* 問い合わせ中メッセージ */
.quote-modal .modal-footer-message {
	text-align: center;
	padding: 16px 0;
}

.quote-modal .modal-footer-message p {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--pointColor, #ff7830);
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.quote-modal .modal-footer-message i {
	font-size: 1.8rem;
}

/* ================================
   見積詳細モーダル レスポンシブ
================================ */
@media (max-width: 1200px) {
	.quote-modal .modal-body {
		flex-direction: column;
		padding: 24px;
		gap: 24px;
	}

	/* 縦積み時は align-items: flex-start により収縮するため全幅を明示 */
	.quote-modal .modal-left,
	.quote-modal .modal-right {
		width: 100%;
	}

	.quote-modal .pdf-preview {
		height: 400px;
	}
}

@media (max-width: 600px) {
	.quote-modal .modal-header {
		padding: 16px 20px;
	}

	.quote-modal .modal-header h3 {
		font-size: 1.6rem;
	}

	.quote-modal .modal-header .modal-quote-number {
		font-size: 1.4rem;
	}

	.quote-modal .modal-header .modal-close {
		font-size: 2.4rem;
	}

	.quote-modal .modal-status-badge {
		font-size: 1.1rem;
		padding: 3px 10px;
	}

	.quote-modal .modal-body {
		padding: 16px;
		gap: 16px;
	}

	.quote-modal .detail-section-title {
		font-size: 1.4rem;
	}

	/* 依頼内容テーブル: SPは7列が収まらないためカード型表示に変換 */
	.quote-modal .request-table {
		font-size: 1.3rem;
	}

	.quote-modal .request-table thead {
		display: none;
	}

	.quote-modal .request-table,
	.quote-modal .request-table tbody,
	.quote-modal .request-table tbody tr,
	.quote-modal .request-table tbody td {
		display: block;
		width: 100%;
	}

	.quote-modal .request-table tbody tr {
		background-color: #fff;
		border: 1px solid #e0e0e0;
		border-radius: 8px;
		padding: 4px 14px;
		margin-bottom: 12px;
	}

	.quote-modal .request-table tbody td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 8px 0;
		border: none;
		border-bottom: 1px dashed #e0e0e0;
		text-align: right;
	}

	.quote-modal .request-table tbody tr td:last-child {
		border-bottom: none;
	}

	.quote-modal .request-table tbody td::before {
		flex-shrink: 0;
		font-weight: 600;
		color: #666;
		text-align: left;
	}

	/* 列順は thead と一致（型番/メーカー/数量/希望単価/RoHS/希望納期/備考） */
	.quote-modal .request-table tbody td:nth-child(1)::before { content: "型番"; }
	.quote-modal .request-table tbody td:nth-child(2)::before { content: "メーカー"; }
	.quote-modal .request-table tbody td:nth-child(3)::before { content: "数量"; }
	.quote-modal .request-table tbody td:nth-child(4)::before { content: "希望単価"; }
	.quote-modal .request-table tbody td:nth-child(5)::before { content: "RoHS"; }
	.quote-modal .request-table tbody td:nth-child(6)::before { content: "希望納期"; }
	.quote-modal .request-table tbody td:nth-child(7)::before { content: "備考"; }

	/* カード内ではPC用の列幅・折返し制限を解除 */
	.quote-modal .request-table .col-part {
		max-width: none;
	}

	.quote-modal .request-table .col-comment {
		min-width: 0;
		max-width: none;
	}

	.quote-modal .pdf-preview {
		height: 300px;
	}

	/* SPはフッターの下部固定をやめ、本文と一緒にスクロールさせる（画面の専有を防ぐ） */
	.quote-modal .modal-content {
		overflow-y: auto;
	}

	.quote-modal .modal-body {
		flex: none;
		overflow-y: visible;
	}

	/* ヘッダー（閉じるボタン）は従来どおり常時表示を維持 */
	.quote-modal .modal-header {
		position: sticky;
		top: 0;
		z-index: 1;
	}

	.quote-modal .modal-footer {
		padding: 16px 20px;
	}

	.quote-modal .modal-footer-buttons {
		flex-direction: column;
		gap: 12px;
	}

	.quote-modal .btn-action {
		width: 100%;
		font-size: 1.4rem;
		padding: 12px 20px;
	}

	.quote-modal .modal-footer-note p {
		font-size: 1.1rem;
	}
}
