/*new_regi.phpと連携するnew_regi.css*/
body {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	margin: 0;
	padding: 20px;
	min-height: 100vh;
	color: #333;
	background-color: #f4f7f6;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.wrapper {
	box-sizing: border-box;
	border-radius: 12px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	padding: 30px 40px;
	width: 100%;
	max-width: 600px;
	background-color: #ffffff;
}

/*画面タイトル*/
.title {
	margin-bottom: 30px;
	text-align: center;
}

.title h1 {
	display: inline-block;
	border-bottom: 3px solid #007bff;
	padding-bottom: 5px;
	color: #007bff;	font-size: 1.8rem;
}

.title h1 i {
	margin-right: 10px;
}

/*フォーム要素と入力欄*/
.regi_info > div {
	margin-bottom: 20px;
}

label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	color: #333;
	font-weight: 600;
}

label:not(.checkbox label) {
	background-color: #e9e9e9;
	padding: 8px 10px;
	border-radius: 6px;
}

.required_tag {
	margin-left: 10px;
	border-radius: 4px;
	padding: 2px 6px;
	color: white;
	background-color: #dc3545;
	font-weight: 500;
}

/*入力欄のコンテナ（box_name, box_mail, box_pass, box_check_pass）*/
.box_name,
.box_mail,
.box_pass,
.box_check_pass {
	position: relative;
}

input[type="text"],
input[type="email"],
input[type="password"] {
	box-sizing: border-box;
	border: 1px solid #ccc;
	border-radius: 8px;
	padding: 12px 15px;
	width: 100%;
	font-size: 1rem;
	transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus {
	box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
	border-color: #007bff;
	outline: none;
}

/*パスワード表示切替アイコン*/
.toggle_password {
	position: absolute;
	top: 50%;
	right: 15px;
	width: 20px;
	color: #666;
	text-align: center;
	transition: color 0.2s;
	transform: translateY(-50%);
	cursor: pointer;
}

.toggle_password:hover {
	color: #007bff;
}

/*エラーメッセージとバリデーションフィードバック（js連携）*/
.error_message {
	display: <?php echo array_filter($field_errors) ? 'block' : 'none';
	margin-bottom: 5px;
}

.field_error {
	margin: 0;
	padding: 0;
	color: #dc3545;
	font-size: 0.9rem;
}

/*jsによるリアルタイムバリデーション時のスタイル*/
/*成功時の入力欄（validation.jsの.input-success）*/
.input-success {
	background-color: #e8f8e8 !important;
	border-color: #28a745 !important;
}

/*失敗時の入力欄（validation.jsの.input-error）*/
.input-error {
	background-color: #fdeaea !important;
	border-color: #dc3545 !important;
}

/*担当教室チェックボックス*/
.checkbox {
	display: flex;
	flex-wrap: wrap;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 10px;
	background-color: #f9f9f9;
	gap: 15px 20px;
}

.checkbox input[type="checkbox"] {
	position: absolute;
	width: 0;
	height: 0;
	opacity: 0;
}

/*カスタムチェックボックスのためのスペース*/
.checkbox label {
	position: relative;	padding-left: 25px;
	margin: 0;
	cursor: pointer;
	display: inline-block;
	user-select: none;
	font-weight: normal;
	transition: color 0.2s;
}

/*カスタムチェックボックスの見た目（チェックマークの箱）*/
.checkbox label::before {
	position: absolute;
	top: 50%;
	left: 0;
	border: 2px solid #007bff;
	border-radius: 4px;
	width: 16px;
	height: 16px;
	background-color: white;
	transition: background-color 0.2s, border-color 0.2s;
	transform: translateY(-50%);
	content: '';
}

/*チェックされた時のスタイル*/
.checkbox input[type="checkbox"]:checked + label::before {
	background-color: #007bff;
	border-color: #007bff;
}

/*チェックマークの見た目*/
.checkbox input[type="checkbox"]:checked + label::after {
	position: absolute;
	top: 50%;
	left: 4px;
	color: white;
	font-family: 'Font Awesome 6 Free';
	font-size: 10px;
	font-weight: 900;
	transform: translateY(-50%);
	content: '\f00c';
}

/*ボタン*/
.btn_group {
	margin-top: 30px;
	text-align: center;
}

.btn_group > div {
	margin-bottom: 15px;
}

.btn_group button {
	border: none;
	border-radius: 8px;
	padding: 12px 20px;
	width: 100%;
	max-width: 300px;
	font-size: 1rem;
	font-weight: 600;
	transition: background-color 0.3s, opacity 0.3s, transform 0.1s;
	cursor: pointer;
}

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

/*アカウント登録ボタン（メインカラーの青）*/
#entry {
	color: white;
	background-color: #007bff;
}

#entry:hover:not(:disabled) {
	background-color: #0056b3;
}

/*jsで制御される無効状態*/
#entry:disabled {
	background-color: #ccc;
	opacity: 0.7;
	cursor: not-allowed;
}

#entry:disabled,
#entry:disabled:hover,
#entry:disabled:active {
	pointer-events: none !important;
	background-color: #ccc !important;
	opacity: 0.7 !important;
	cursor: not-allowed !important;
	transform: none !important;
}

/*リセットボタン（灰色）*/
#reset {
	color: white;
	background-color: #6c757d;
}

#reset:hover {
	background-color: #5a6268;
}

/*戻るボタン（白／アウトライン）*/
.return_btn button {
	background-color: white;
	color: #007bff;	border: 1px solid #007bff;
}

.return_btn button:hover {
	background-color: #e9f5ff;
}