/**
 * SMF Extension - フロント側バリデーター CSS
 *
 * @package SMF_Extension
 */

/* ============================================
   エラー表示
   ============================================ */

.smf-extension-error {
	border-color: #d63638 !important;
	background-color: #fef7f7 !important;
}

.smf-extension-error:focus {
	box-shadow: 0 0 0 1px #d63638 !important;
	outline: none;
}

.smf-extension-error-message {
	display: block;
	margin-top: 4px;
	color: #d63638;
	font-size: 0.875em;
	line-height: 1.4;
}

.smf-extension-error-message::before {
	content: "⚠ ";
	font-weight: bold;
	margin-right: 2px;
}

/* ============================================
   検証成功時のフィードバック（オプション）
   ============================================ */

.smf-extension-valid {
	border-color: #00a32a !important;
}

/* ============================================
   ローディングインジケーター（将来拡張用）
   ============================================ */

.smf-extension-validating {
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='none' stroke='%23999' stroke-width='2' stroke-dasharray='4 4'><animateTransform attributeName='transform' type='rotate' from='0 8 8' to='360 8 8' dur='1s' repeatCount='indefinite'/></circle></svg>");
	background-position: right 8px center;
	background-repeat: no-repeat;
	padding-right: 32px;
}

/* ============================================
   郵便番号自動入力フィードバック
   ============================================ */

.smf-extension-postal-filled {
	animation: smf-extension-postal-flash 1s ease-out;
}

@keyframes smf-extension-postal-flash {
	0% {
		background-color: #fff8c5;
		box-shadow: 0 0 0 2px rgba(240, 184, 73, 0.3);
	}
	100% {
		background-color: transparent;
		box-shadow: none;
	}
}

/* ============================================
   郵便番号 検索ボタン
   ============================================ */

.smf-extension-postal-button {
	display: inline-block;
	margin-left: 8px;
	padding: 6px 14px;
	font-size: 14px;
	line-height: 1.4;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	cursor: pointer;
	color: #2c3338;
	vertical-align: middle;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.smf-extension-postal-button:hover {
	background: #f0f0f1;
	border-color: #8c8f94;
}

.smf-extension-postal-button:active {
	background: #e0e0e1;
}

.smf-extension-postal-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ============================================
   ステータス表示（検索中・エラー）
   ============================================ */

.smf-extension-postal-status {
	display: block;
	margin-top: 4px;
	font-size: 0.875em;
	line-height: 1.4;
}

.smf-extension-postal-loading {
	color: #50575e;
}

.smf-extension-postal-loading::before {
	content: "⏳ ";
	margin-right: 2px;
}

.smf-extension-postal-error {
	color: #d63638;
}

.smf-extension-postal-error::before {
	content: "⚠ ";
	margin-right: 2px;
	font-weight: bold;
}

/* ============================================
   複数候補ドロップダウン
   ============================================ */

.smf-extension-postal-candidates {
	display: block;
	margin-top: 4px;
	max-width: 100%;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.smf-extension-postal-candidates-header {
	position: relative;
	padding: 8px 36px 8px 12px;
	background: #f6f7f7;
	border-bottom: 1px solid #c3c4c7;
	font-size: 0.875em;
	font-weight: 600;
	color: #2c3338;
}

.smf-extension-postal-candidates-close {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	color: #50575e;
	font-size: 18px;
	line-height: 1;
	transition: background-color 0.15s ease;
}

.smf-extension-postal-candidates-close:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #1d2327;
}

.smf-extension-postal-candidate {
	display: block;
	width: 100%;
	padding: 10px 12px;
	margin: 0;
	background: transparent;
	border: 0;
	border-bottom: 1px solid #f0f0f1;
	cursor: pointer;
	text-align: left;
	font-size: 0.95em;
	line-height: 1.4;
	color: #2c3338;
	transition: background-color 0.1s ease;
}

.smf-extension-postal-candidate:last-child {
	border-bottom: 0;
}

.smf-extension-postal-candidate:hover,
.smf-extension-postal-candidate:focus {
	background: #f0f6fc;
	outline: none;
}

.smf-extension-postal-candidate:active {
	background: #e0eaf3;
}
