/*==================================

　■お問合せCSS

*==================================*/

 /* CSS Variables */
:root {
	--bg-color: #f2f2f2;
	--text-color: #333333;
	--input-bg: #ffffff;
	--accent-color: #333333;
	--error-color: #d32f2f;
	--border-radius: 8px;
	--spacing-md: 2rem;
} 

 Reset { box-sizing: border-box; margin: 0; padding: 0; } 

body {
	font-family: 'Noto Sans JP', sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.6;
	min-height: 100vh;
	flex-direction: column;  /*縦に積む */
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 90px auto 0;
    width: 90%;
    max-width: 1000px;
}

@media (min-width: 1400px) {
	.wrapper { flex-direction: row; } /* 横に並べる */
}

.header-content {
	margin-bottom: 3rem;
	text-align: center;
}

.header-content p {
	font-size: 1rem;
}

@media (max-width: 768px) {
	.header-content p {
		font-size: 0.85rem;
	}
}

h1.page-title { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }

 /* Step Indicator */
.step-indicator {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	position: relative;
	margin-top: 1rem;
}

.step-indicator::before {
	content: '';
	position: absolute;
	left: 7px;
	top: 5px;
	bottom: 5px;
	width: 1px;
	background-color: #ddd;
	z-index: 0;
}

.step-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	position: relative;
	z-index: 1;
	opacity: 0.4;
	transition: opacity 0.3s;
}

.step-item.active {
	opacity: 1;
	font-weight: 700;
}

.step-dot {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background-color: #fff;
	border: 2px solid transparent;
	transition: all 0.3s;
}

.step-item.active .step-dot {
	background-color: var(--accent-color);
	transform: scale(1.2);
}

.form-container {
    width: 100%;
    max-width: 800px;
    margin: 1rem 0;
}

/* 1400px以上のメディアクエリも中央寄せを維持するように調整 */
@media (min-width: 1400px) {
    .wrapper { 
        flex-direction: column; /* rowにするとタイトルとフォームが横並びになるため、中央寄せならcolumnのままが綺麗です */
        align-items: center; 
    } 
}

 /* Form Elements */
.form-row {
	margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
	.form-row {
	 	flex-direction: row;
	 	align-items: flex-start;
	 }
}

.form-label {
	width: 100%;
	margin-bottom: 0.5rem;
	font-weight: 700;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	padding-top: 10px;
}

@media (min-width: 768px) {
	.form-label {
		margin-bottom: 0;
		flex-shrink: 0;
	}
}

.required-mark {
	color: #d32f2f;
	margin-left: 0.5rem;
	font-size: 0.8rem;
	padding: 2px 6px;
	border-radius: 4px;
}

.input-wrapper {
	width: 100%;
	position: relative;
}

 /* Standard Inputs (Text, Email, Tel, Textarea) */
input[type="text"], input[type="email"], input[type="tel"], textarea {
	width: 100%;
	padding: 15px 20px;
	font-size: 1rem;
	border: 1px solid transparent;
	border-radius: var(--border-radius);
	background-color: var(--input-bg);
	color: var(--text-color);
	transition: all 0.2s;
}

input:focus, textarea:focus {
	outline: none;
	border-color: #ccc;
	background-color: #fff;
	box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

/* ---------------------------------------------------- */
/* Modern Custom Select Styles                          */
/* ---------------------------------------------------- */

/* 元のセレクトボックスは隠す */
select { display: none; }

.custom-select-wrapper {
	position: relative;
	user-select: none;
	width: 100%;
	font-family: inherit;
}

.custom-select-trigger {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 15px 20px;
	font-size: 1rem;
	background-color: var(--input-bg);
	color: #888; /* 未選択時はグレーっぽく */
	border-radius: var(--border-radius);
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s;
}

 /* 選択済みの場合の色 */
.custom-select-trigger.has-value {
	color: var(--text-color);
}

.custom-select-trigger:hover {
	background-color: #fff;
}

.custom-select-trigger::after {
	content: '';
	width: 8px;
	height: 8px;
	border-right: 2px solid #cecece;
	border-bottom: 2px solid #cecece;
	transform: rotate(45deg) translateY(-2px);
	transition: all 0.3s;
	margin-left: 10px;
}

 /* Open State Trigger */
.custom-select.open .custom-select-trigger {
	border-color: #ccc;
	background-color: #fff;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.custom-select.open .custom-select-trigger::after {
	transform: rotate(225deg) translateY(2px);
	border-color: var(--accent-color);
}

 /* Dropdown Options */
.custom-options {
	position: absolute;
	display: block;
	top: 100%;
	left: 0;
	right: 0;
	border: 1px solid #ccc; /* 開いたときだけボーダーあり */
	border-top: 0;
	background: #fff;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-10px);
	z-index: 100;
	border-bottom-left-radius: var(--border-radius);
	border-bottom-right-radius: var(--border-radius);
	box-shadow: 0 10px 20px rgba(0,0,0,0.1);
	max-height: 250px;
	overflow-y: auto;
}

.custom-select.open .custom-options {
	opacity: 1;
	visibility: visible;
	pointer-events: all;
	transform: translateY(0);
}

.custom-option {
	position: relative;
	display: block;
	padding: 12px 20px;
	font-size: 0.95rem;
	color: var(--text-color);
	cursor: pointer;
	transition: all 0.2s;
	border-bottom: 1px solid #f5f5f5;
}

.custom-option:last-child {
	border-bottom: none;
}

.custom-option:hover {
	background-color: #f5f5f5;
	color: var(--accent-color);
	padding-left: 25px; /* ホバーで少し動く */
}

.custom-option.selected {
	background-color: #f0f0f0;
	font-weight: 600;
}

 /* Error Styling for Custom Select */
.input-error + .custom-select-wrapper .custom-select-trigger {
	border-color: var(--error-color);
	background-color: #fff8f8;
}

 /* ---------------------------------------------------- */

textarea { min-height: 200px; resize: vertical; }

 /* Error Styles */
.input-error {
	border-color: var(--error-color) !important;
	background-color: #fff8f8 !important;
}

.error-msg {
	color: var(--error-color);
	font-size: 0.8rem;
	margin-top: 5px;
	display: none;
}

.input-error + .error-msg {
	display: block;
}
        
 /* Custom Select用のエラー表示調整 */
.custom-select-container.input-error .custom-select-trigger {
	border-color: var(--error-color);
	background-color: #fff8f8;
}

 /* Confirmation */
.confirm-row {
	display: flex; flex-direction: column; margin-bottom: 1.5rem; border-bottom: 1px solid #e0e0e0; padding-bottom: 1rem;
}

@media (min-width: 768px) { .confirm-row { flex-direction: row; } }
.confirm-label {
	font-weight: 700;
	width: 220px;
	color: #666;
}

.confirm-value {
	flex: 1;
	font-weight: 500;
	white-space: pre-wrap;
}

 /* Buttons */
.button-group {
	display: flex;
	gap: 1rem;
	margin-top: 3rem;
	justify-content: center;
}

@media (min-width: 768px) {
	.button-group { margin-left: 300px; justify-content: flex-start; }
}

.btn {
	padding: 16px 48px;
	font-size: 1rem;
	font-weight: 700;
	border-radius: var(--border-radius);
	cursor: pointer;
	border: none;
	min-width: 200px;
}

.btn-primary {
	background-color: #333;
	color: #fff;
}

.btn-primary:hover {
	background-color: #555;
}

.btn-secondary {
	background-color: #fff;
	color: #333;
	border: 1px solid #ddd;
}
.btn-secondary:hover { background-color: #f9f9f9; }

 /* Views */
.view-section {
	display: none;
	animation: fadeIn 0.5s ease;
}

.view-section.active {
	display: block;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

 /* Mobile */
@media (max-width: 768px) {
	.step-indicator { flex-direction: row; gap: 1rem; justify-content: center; margin-bottom: 1rem; font-size: 0.8rem; }
	.step-indicator::before { display: none; }
	.step-dot { display: none; }
	h1.page-title { font-size: 1.8rem; text-align: center; }
}
