/**
 * Contact Form 7 共通スタイル（depost-cf7-* マークアップ用）
 */

/* CF7 デフォルト CSS が無いページでも hidden fieldset を隠す */
.wpcf7-form .hidden-fields-container {
	display: none !important;
}

.wpcf7-response-output[aria-hidden="true"]:empty {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
}

.depost-form-card .wpcf7-form,
.depost-inquiry__form .wpcf7-form {
	display: block !important;
	grid-template-columns: unset !important;
	gap: 0 !important;
}

/* --- レイアウト --- */
.depost-cf7-grid {
	display: flex;
	flex-direction: column;
	gap: clamp(18px, 3.2vw, 22px);
}

.depost-cf7-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(18px, 3.2vw, 22px);
}

@media (min-width: 680px) {
	.depost-cf7-row--half {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: clamp(20px, 3.5vw, 28px);
		row-gap: clamp(18px, 2.8vw, 22px);
		align-items: start;
	}

	.depost-cf7-row--half .depost-cf7-label {
		min-height: 2.75em;
	}
}

.depost-cf7-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.depost-cf7-field > p {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.depost-cf7-field > p > br {
	display: none;
}

.depost-cf7-intro {
	margin: 0 0 2px;
	font-size: clamp(0.875rem, 0.3vw + 0.82rem, 0.9375rem);
	line-height: 1.65;
	color: #4b5563;
}

/* --- ラベル --- */
.depost-cf7-label {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: clamp(0.875rem, 0.32vw + 0.8rem, 0.9375rem);
	font-weight: 700;
	margin: 0;
	color: #1f2937;
	letter-spacing: 0.02em;
	line-height: 1.45;
}

.depost-cf7-label--required::after {
	content: "必須";
	display: inline-block;
	padding: 2px 7px;
	background: #c41e3a;
	color: #fff;
	font-size: 0.625rem;
	font-weight: 700;
	border-radius: 4px;
	line-height: 1.35;
	letter-spacing: 0.06em;
	flex-shrink: 0;
}

.depost-cf7-hint {
	font-size: 0.78rem;
	color: #6b7280;
	line-height: 1.5;
}

/* --- 入力欄（統一） --- */
.depost-form-card .wpcf7-form-control-wrap,
.depost-inquiry__form .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
}

.depost-cf7-input,
.depost-cf7-select,
.wpcf7-form .depost-cf7-input,
.wpcf7-form .depost-cf7-select,
.depost-form-card .wpcf7-form-control:not(.wpcf7-submit):not(textarea),
.depost-inquiry__form .wpcf7-form-control:not(.wpcf7-submit):not([type="checkbox"]):not([type="radio"]):not(textarea) {
	width: 100%;
	height: 48px;
	min-height: 48px;
	max-height: none;
	border-radius: 10px;
	border: 1.5px solid #d1d5db;
	padding: 0 14px;
	font-size: 16px;
	font-family: inherit;
	line-height: 1.4;
	margin: 0;
	box-sizing: border-box;
	background: #fff;
	color: #111827;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

@media (min-width: 680px) {
	.depost-cf7-input,
	.depost-cf7-select,
	.wpcf7-form .depost-cf7-input,
	.wpcf7-form .depost-cf7-select,
	.depost-form-card .wpcf7-form-control:not(.wpcf7-submit):not(textarea),
	.depost-inquiry__form .wpcf7-form-control:not(.wpcf7-submit):not([type="checkbox"]):not([type="radio"]):not(textarea) {
		font-size: 0.9375rem;
	}
}

.depost-cf7-select,
.wpcf7-form .depost-cf7-select,
.depost-form-card select.wpcf7-form-control:not(.wpcf7-submit) {
	cursor: pointer;
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px;
}

.wpcf7-form textarea.wpcf7-form-control,
.wpcf7-form textarea.custom-textarea,
.depost-cf7-textarea,
.wpcf7-form .depost-cf7-textarea,
.depost-form-card textarea.wpcf7-form-control,
.depost-inquiry__form textarea.wpcf7-form-control {
	display: block;
	width: 100%;
	height: 120px !important;
	min-height: 120px;
	max-height: 200px;
	padding: 12px 14px;
	border-radius: 10px;
	border: 1.5px solid #d1d5db;
	font-size: 16px;
	font-family: inherit;
	line-height: 1.6;
	margin: 0;
	box-sizing: border-box;
	background: #fff;
	color: #111827;
	resize: vertical;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.depost-cf7-input::placeholder,
.depost-cf7-textarea::placeholder,
.wpcf7-form .depost-cf7-input::placeholder,
.wpcf7-form .depost-cf7-textarea::placeholder {
	color: #9ca3af;
	opacity: 1;
}

.depost-cf7-input:hover,
.depost-cf7-select:hover,
.depost-cf7-textarea:hover,
.wpcf7-form .depost-cf7-input:hover,
.wpcf7-form .depost-cf7-select:hover,
.wpcf7-form .depost-cf7-textarea:hover,
.depost-form-card .wpcf7-form-control:not(.wpcf7-submit):hover {
	border-color: #9ca3af;
}

.depost-cf7-input:focus,
.depost-cf7-select:focus,
.depost-cf7-textarea:focus,
.wpcf7-form .depost-cf7-input:focus,
.wpcf7-form .depost-cf7-select:focus,
.wpcf7-form .depost-cf7-textarea:focus,
.depost-form-card .wpcf7-form-control:not(.wpcf7-submit):focus {
	outline: none;
	border-color: #c41e3a;
	box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.12);
	background: #fff;
}

.depost-cf7-file,
.wpcf7-form .depost-cf7-file {
	height: auto;
	min-height: auto;
	padding: 8px 0;
	font-size: 0.875rem;
	color: #4b5563;
	border: 0;
	background: transparent;
}

/* 添付画像3列 — ラベル高さ差でファイル欄がずれないようにする */
.depost-cf7-row--attachments {
	display: grid;
	grid-template-columns: 1fr;
	gap: clamp(16px, 3vw, 20px);
	align-items: stretch;
}

@media (min-width: 640px) {
	.depost-cf7-row--attachments {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.depost-cf7-field--attachment {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	height: 100%;
}

.depost-cf7-field--attachment .depost-cf7-label {
	margin: 0;
}

.depost-cf7-file-hint {
	margin: 0;
	min-height: 1.35em;
	font-size: 0.75rem;
	font-weight: 400;
	line-height: 1.4;
	color: #6b7280;
}

.depost-cf7-file-hint--spacer {
	visibility: hidden;
	user-select: none;
}

.depost-cf7-field--attachment .wpcf7-form-control-wrap {
	margin-top: auto;
	width: 100%;
}

.depost-cf7-field--attachment .depost-cf7-file,
.depost-cf7-field--attachment input[type="file"].depost-cf7-file {
	width: 100%;
	max-width: 100%;
	font-size: 0.8125rem;
	line-height: 1.5;
}

/* --- チェックボックス --- */
.depost-cf7-checkboxes .wpcf7-list-item {
	margin: 0 0 8px;
}

.depost-cf7-checkboxes .wpcf7-list-item label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	font-size: 0.9375rem;
	color: #374151;
	margin: 0;
	cursor: pointer;
}

/* --- 送信 --- */
.depost-cf7-actions {
	padding-top: clamp(16px, 3vw, 22px);
	margin-top: 2px;
	border-top: 1px solid #e5e7eb;
}

.depost-cf7-actions > p {
	margin: 0;
}

.depost-cf7-submit,
.wpcf7-form input[type="submit"].depost-cf7-submit,
.depost-form-card .wpcf7-submit {
	display: block;
	margin: 0 auto;
	width: min(100%, 320px);
	cursor: pointer;
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.05em;
	height: 52px;
	min-height: 52px;
	border-radius: 999px;
	border: 0;
	background: #c41e3a;
	color: #fff;
	box-shadow: 0 4px 14px rgba(196, 30, 58, 0.28);
	transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.depost-cf7-submit:hover,
.wpcf7-form input[type="submit"].depost-cf7-submit:hover,
.depost-form-card .wpcf7-submit:hover {
	background: #a8172e;
	box-shadow: 0 6px 18px rgba(196, 30, 58, 0.34);
}

.depost-cf7-submit:active,
.wpcf7-form input[type="submit"].depost-cf7-submit:active,
.depost-form-card .wpcf7-submit:active {
	transform: translateY(1px);
}

/* --- バリデーション・レスポンス --- */
.depost-form-card .wpcf7-not-valid-tip,
.depost-inquiry__form .wpcf7-not-valid-tip {
	margin-top: 6px;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: #c41e3a;
	font-weight: 600;
}

.depost-form-card .wpcf7-response-output,
.depost-inquiry__form .wpcf7-response-output {
	margin: 14px 0 0;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	box-sizing: border-box;
	border: 1px solid #e5e7eb;
	background: #f9fafb;
	color: #111827;
}

.depost-form-card .wpcf7-spinner,
.depost-inquiry__form .wpcf7-spinner {
	display: block;
	margin: 14px auto 0;
}
