/**
 * Mobility Project Manager - Public CSS (v1.1.0)
 * LINE風／スマホ特化／業務ツール
 */

/* ============================================================
   制作依頼書 / ステータス確認ページ ：ヘッダー・フッター非表示
   ============================================================ */
body.mpm-minimal-page {
	background: #7DA4CD !important;
	min-height: 100vh;
}

body.mpm-minimal-page .wp-site-blocks > header,
body.mpm-minimal-page .wp-site-blocks > footer,
body.mpm-minimal-page > header,
body.mpm-minimal-page > footer,
body.mpm-minimal-page .site-header,
body.mpm-minimal-page .site-footer,
body.mpm-minimal-page .wp-block-template-part[data-type="header"],
body.mpm-minimal-page .wp-block-template-part[data-type="footer"],
body.mpm-minimal-page header.wp-block-template-part,
body.mpm-minimal-page footer.wp-block-template-part {
	display: none !important;
}

body.mpm-minimal-page .entry-header,
body.mpm-minimal-page .wp-block-post-title,
body.mpm-minimal-page .entry-title {
	display: none !important;
}

body.mpm-minimal-page .entry-content,
body.mpm-minimal-page .wp-block-post-content,
body.mpm-minimal-page main,
body.mpm-minimal-page .wp-site-blocks {
	padding: 0 !important;
	margin: 0 !important;
	max-width: 100% !important;
	background: transparent !important;
}

body.mpm-minimal-page .wp-site-blocks > .wp-block-group,
body.mpm-minimal-page .wp-site-blocks > .wp-block-cover {
	margin: 0 !important;
	padding: 0 !important;
	max-width: 100% !important;
}

/* admin bar も非表示にしたい場合は CSS のみで隠す（PHPからは触らない） */
body.mpm-minimal-page #wpadminbar {
	display: none !important;
}
body.mpm-minimal-page.admin-bar {
	margin-top: 0 !important;
}
html.mpm-html { margin-top: 0 !important; }

/* ============================================================
   フォーム本体（LINE風）
   ============================================================ */
.mpm-form-wrap,
.mpm-status-wrap {
	max-width: 560px;
	margin: 0 auto;
	padding: 20px 14px 60px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
	color: #1f2937;
	line-height: 1.7;
	box-sizing: border-box;
}

/* フォームヘッダー */
.mpm-form-header {
	text-align: center;
	color: #ffffff;
	margin-bottom: 18px;
	padding: 6px 4px 14px;
}

.mpm-form-title {
	margin: 0 0 8px;
	font-size: 26px;
	font-weight: 800;
	color: #ffffff;
	letter-spacing: 0.02em;
	text-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.mpm-form-lead {
	font-size: 13px;
	line-height: 1.7;
	color: #f5faff;
	margin: 0;
	opacity: 0.95;
}

/* カード */
.mpm-card {
	background: #ffffff;
	border-radius: 14px;
	padding: 16px 18px;
	margin-bottom: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.mpm-card-alert {
	padding: 0;
}

.mpm-card-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: #111827;
}

/* ラベル */
.mpm-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: #06C755;
	margin-bottom: 8px;
	line-height: 1.5;
}

.mpm-required {
	display: inline-block;
	background: #ef4444;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 7px;
	border-radius: 10px;
	margin-left: 6px;
	vertical-align: middle;
	letter-spacing: 0.04em;
}

/* 入力欄（iOSズーム防止のため16px） */
.mpm-input {
	width: 100%;
	padding: 12px 14px;
	font-size: 16px;
	border: 1.5px solid #e5e7eb;
	border-radius: 12px;
	background: #fff;
	color: #111827;
	box-sizing: border-box;
	font-family: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}

.mpm-input:focus {
	outline: none;
	border-color: #06C755;
	box-shadow: 0 0 0 3px rgba(6, 199, 85, 0.18);
}

/* 自動入力（readonly）欄は薄いグレー背景で「触れない」と分かるように */
.mpm-input[readonly] {
	background: #f0f3f6;
	color: #6b7280;
	cursor: not-allowed;
	border-color: #d1d5db;
	box-shadow: none;
}
.mpm-input[readonly]:focus {
	border-color: #d1d5db;
	box-shadow: none;
}

textarea.mpm-input {
	resize: vertical;
	min-height: 120px;
	line-height: 1.7;
}

textarea.mpm-textarea-lg {
	min-height: 180px;
}

/* タグ情報（GTM用）のサブ説明文 */
.mpm-label .mpm-field-note {
	display: block;
	font-size: 11px;
	font-weight: 400;
	color: #8a96a3;
	margin-top: 2px;
	letter-spacing: 0;
	line-height: 1.5;
}

/* タグ情報の textarea を広めに */
.mpm-field--tags textarea.mpm-input {
	min-height: 100px;
	font-size: 14px;
	line-height: 1.6;
}

/* select 矢印 */
select.mpm-input {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2306C755' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
	padding-right: 36px;
}

/* アラート */
.mpm-alert {
	padding: 14px 18px;
	border-radius: 14px;
	font-size: 14px;
}

.mpm-alert-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
}

/* 送信ボタン（ピル型大型） */
.mpm-submit {
	margin-top: 20px;
	text-align: center;
}

.mpm-button {
	display: inline-block;
	min-width: 240px;
	padding: 16px 36px;
	background: #06C755;
	color: #ffffff;
	border: none;
	border-radius: 999px;
	font-size: 17px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
	font-family: inherit;
	box-shadow: 0 4px 12px rgba(6, 199, 85, 0.35);
	-webkit-appearance: none;
	appearance: none;
}

.mpm-button:hover {
	background: #05a948;
	color: #ffffff;
	box-shadow: 0 6px 14px rgba(6, 199, 85, 0.4);
}

.mpm-button:active {
	transform: translateY(1px);
}

.mpm-button:disabled {
	background: #9ca3af;
	box-shadow: none;
	cursor: not-allowed;
}

.mpm-button-secondary {
	background: #6b7280;
	box-shadow: 0 4px 12px rgba(107, 114, 128, 0.25);
}

.mpm-button-secondary:hover {
	background: #4b5563;
	box-shadow: 0 6px 14px rgba(107, 114, 128, 0.3);
}

/* ============================================================
   ドロップゾーン（添付ファイル）
   ============================================================ */
.mpm-dropzone {
	position: relative;
	border: 2px dashed #06C755;
	border-radius: 14px;
	background: #f0fdf4;
	transition: background 0.15s, border-color 0.15s;
	overflow: hidden;
}

.mpm-dropzone.is-dragover {
	background: #dcfce7;
	border-color: #05a948;
}

.mpm-dropzone-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

.mpm-dropzone-inner {
	padding: 22px 16px;
	text-align: center;
	pointer-events: none;
}

.mpm-dropzone-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #06C755;
	color: #fff;
	font-size: 26px;
	font-weight: bold;
	margin-bottom: 8px;
	line-height: 1;
}

.mpm-dropzone-text {
	font-size: 14px;
	color: #047857;
	font-weight: 600;
	margin-bottom: 4px;
}

.mpm-dropzone-help {
	font-size: 11px;
	color: #65a373;
	line-height: 1.5;
}

/* ファイルリスト */
.mpm-file-list {
	list-style: none;
	padding: 0;
	margin: 12px 0 0;
}

.mpm-file-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	margin-bottom: 6px;
	font-size: 13px;
}

.mpm-file-thumb {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	object-fit: cover;
	background: #e5e7eb;
	flex-shrink: 0;
}

.mpm-file-thumb-doc {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 6px;
	background: #dbeafe;
	color: #1e40af;
	font-weight: 700;
	font-size: 10px;
	flex-shrink: 0;
	text-transform: uppercase;
}

.mpm-file-info {
	flex: 1;
	overflow: hidden;
}

.mpm-file-name {
	display: block;
	color: #111827;
	font-weight: 500;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.mpm-file-size {
	display: block;
	color: #6b7280;
	font-size: 11px;
}

.mpm-file-remove {
	background: none;
	border: none;
	color: #ef4444;
	font-size: 18px;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
}

.mpm-file-remove:hover {
	color: #b91c1c;
}

/* ============================================================
   受付完了画面
   ============================================================ */
.mpm-complete {
	text-align: center;
}

.mpm-complete-icon {
	width: 64px;
	height: 64px;
	margin: 4px auto 14px;
	background: #06C755;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 34px;
	font-weight: bold;
	box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.mpm-complete-info {
	background: #f9fafb;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 18px 0;
	text-align: left;
}

.mpm-complete-row {
	display: flex;
	padding: 6px 0;
	gap: 12px;
	font-size: 14px;
}

.mpm-complete-label {
	color: #6b7280;
	width: 120px;
	flex-shrink: 0;
}

.mpm-complete-value {
	font-weight: 600;
	color: #111827;
	word-break: break-all;
}

.mpm-complete-status {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 18px 0;
	text-align: left;
}

.mpm-status-link {
	word-break: break-all;
	margin: 8px 0 0;
}

.mpm-status-link a {
	color: #2563eb;
	font-weight: 600;
	font-size: 14px;
}

.mpm-complete-note {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 12px;
	padding: 14px 18px;
	margin: 18px 0;
	text-align: left;
	font-size: 13px;
	color: #92400e;
}

.mpm-complete-note p {
	margin: 4px 0;
}

/* ============================================================
   バッジ / ステータス確認画面
   ============================================================ */
.mpm-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
}

.mpm-badge-large {
	padding: 6px 14px;
	font-size: 14px;
}

.mpm-status-meta {
	background: #f9fafb;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 18px 0;
}

.mpm-status-meta-row {
	display: flex;
	padding: 8px 0;
	border-bottom: 1px dashed #e5e7eb;
	gap: 12px;
	align-items: center;
}

.mpm-status-meta-row:last-child {
	border-bottom: none;
}

.mpm-status-meta-label {
	color: #6b7280;
	font-size: 13px;
	width: 130px;
	flex-shrink: 0;
}

.mpm-status-meta-value {
	color: #111827;
	font-size: 14px;
	flex: 1;
	word-break: break-all;
}

.mpm-public-note {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 18px 0;
}

.mpm-public-note h3 {
	margin: 0 0 8px;
	font-size: 14px;
	color: #065f46;
}

.mpm-public-note-body {
	font-size: 14px;
	color: #064e3b;
	line-height: 1.7;
}

.mpm-public-comments {
	margin: 20px 0;
}

.mpm-public-comments h3 {
	font-size: 15px;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e5e7eb;
	color: #374151;
}

.mpm-public-comments-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mpm-public-comment {
	padding: 10px 14px;
	margin-bottom: 6px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	font-size: 13px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.mpm-public-comment-system {
	background: #f9fafb;
	color: #6b7280;
	font-size: 12px;
}

.mpm-public-comment-public {
	border-left: 3px solid #06C755;
}

.mpm-public-comment-date {
	color: #6b7280;
	font-size: 12px;
	white-space: nowrap;
	min-width: 110px;
}

.mpm-status-notice {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 12px;
	padding: 14px 18px;
	margin-top: 20px;
	font-size: 13px;
	color: #92400e;
}

.mpm-status-notice p {
	margin: 4px 0;
}

/* ============================================================
   スマホ最適化
   ============================================================ */
@media (max-width: 560px) {
	.mpm-form-wrap,
	.mpm-status-wrap {
		padding: 16px 10px 50px;
	}

	.mpm-card {
		padding: 14px 14px;
		border-radius: 12px;
	}

	.mpm-form-title {
		font-size: 22px;
	}

	.mpm-form-lead {
		font-size: 12px;
	}

	.mpm-button {
		width: 100%;
		min-width: 0;
	}

	.mpm-status-meta-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.mpm-status-meta-label {
		width: auto;
		font-size: 12px;
	}

	.mpm-complete-row {
		flex-direction: column;
		gap: 2px;
	}

	.mpm-complete-label {
		width: auto;
		font-size: 12px;
	}
}

/* ============================================================
   v1.1.4: 依頼者向け公開編集ボタン・編集画面
   ============================================================ */

/* ステータスページの編集ボタンエリア */
.mpm-edit-button-wrap {
	text-align: center;
	margin: 24px 0 8px;
}

.mpm-edit-button-help {
	margin-top: 10px;
	font-size: 12px;
	color: #6b7280;
}

/* ロックされた案件の表示 */
.mpm-status-locked {
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	padding: 14px 18px;
	margin: 18px 0 8px;
	font-size: 13px;
	color: #4b5563;
	text-align: center;
}

.mpm-status-locked p {
	margin: 4px 0;
}

/* 編集画面の編集不可サマリー */
.mpm-readonly-summary {
	background: #f9fafb !important;
}

.mpm-readonly-row {
	display: flex;
	padding: 6px 0;
	gap: 12px;
	font-size: 13px;
	border-bottom: 1px dashed #e5e7eb;
	align-items: center;
}

.mpm-readonly-row:last-of-type {
	border-bottom: none;
}

.mpm-readonly-label {
	color: #6b7280;
	width: 120px;
	flex-shrink: 0;
}

.mpm-readonly-value {
	color: #111827;
	font-weight: 600;
	flex: 1;
	word-break: break-all;
}

.mpm-readonly-note {
	font-size: 11px;
	color: #9ca3af;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #e5e7eb;
	line-height: 1.6;
}

/* キャンセルリンク */
.mpm-cancel-link {
	color: #6b7280;
	font-size: 13px;
	text-decoration: underline;
}

.mpm-cancel-link:hover {
	color: #374151;
}

/* 成功フラッシュ */
.mpm-alert-success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #047857;
	padding: 14px 18px;
	border-radius: 14px;
	font-size: 14px;
}

/* ステータスページの依頼者編集可能項目セクション */
.mpm-public-details h3 {
	font-size: 15px;
	margin: 18px 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #e5e7eb;
	color: #374151;
}

@media (max-width: 560px) {
	.mpm-readonly-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}
	.mpm-readonly-label {
		width: auto;
		font-size: 12px;
	}
}
