/*
 * brute_force_demo.css
 * ブルートフォース攻撃対策｜体験デモ（試行回数制限とアカウントロック）
 * 既存サイトのクラスと衝突しないよう bf- を接頭辞にしています。
 */

#bf-demo {
	box-sizing: border-box;
	margin: 1.4rem 0;
	padding: 1rem 1.1rem 2.2rem;
	background: #faf1e8;
	border-radius: 1rem;
	scroll-margin-top: 90px;
}

#bf-demo *,
#bf-demo *::before,
#bf-demo *::after {
	box-sizing: border-box;
}

.bf-container {
	max-width: 640px;
	margin: 0 auto;
}

.bf-head {
	text-align: center;
	padding-top: 1.6rem;
	margin-bottom: 1.4rem;
}

.bf-badge {
	display: inline-block;
	padding: .6rem 2rem;
	border-radius: 999px;
	background: #c1631f;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: .06em;
	margin-bottom: .6rem;
	box-shadow: 0 0 0 0 rgba(193, 99, 31, .45);
	animation: bf-badge-pulse 2.2s ease-out infinite;
}

@keyframes bf-badge-pulse {
	0% { box-shadow: 0 0 0 0 rgba(193, 99, 31, .45); }
	70% { box-shadow: 0 0 0 .55rem rgba(193, 99, 31, 0); }
	100% { box-shadow: 0 0 0 0 rgba(193, 99, 31, 0); }
}

h3.bf-headline {
	display: block;
	background: none;
	margin: .7rem auto 0;
	max-width: 30rem;
	font-size: 1.24rem;
	font-weight: 800;
	line-height: 1.6;
	color: #12233f;
}

.bf-headline__mark {
	color: #c1631f;
}

.bf-lead {
	font-size: .86rem;
	color: #555;
	line-height: 1.9;
	margin: .6rem auto 0;
	max-width: 32rem;
}

.bf-panel {
	background: #fff;
	border-radius: 1rem;
	box-shadow: 0 .6rem 1.8rem rgba(0, 30, 70, .08);
	padding: 1.6rem 1.3rem 1.4rem;
}

.bf-mode-toggle {
	display: flex;
	gap: .5rem;
	margin-bottom: 1.1rem;
}

.bf-mode-btn {
	flex: 1;
	appearance: none;
	border: .1rem solid #ecd9c4;
	background: #fff;
	color: #556;
	padding: .55rem .4rem;
	border-radius: .7rem;
	font-size: .78rem;
	font-weight: 700;
	cursor: pointer;
}

.bf-mode-btn.is-active {
	background: #12233f;
	border-color: #12233f;
	color: #fff;
}

.bf-mode-btn--safe.is-active {
	background: #c1631f;
	border-color: #c1631f;
}

.bf-status-row {
	display: flex;
	align-items: center;
	gap: .8rem;
	margin-bottom: .9rem;
}

.bf-counter {
	flex: 1;
}

.bf-counter__label {
	font-size: .74rem;
	color: #667;
}

.bf-counter__value {
	font-family: 'Courier New', monospace;
	font-size: 1.6rem;
	font-weight: 800;
	color: #12233f;
}

.bf-clerk {
	width: 2.6rem;
	flex-shrink: 0;
	filter: drop-shadow(0 .2rem .3rem rgba(0, 30, 70, .15));
	transform-origin: 50% 100%;
}

.bf-clerk svg {
	width: 100%;
	height: auto;
	display: block;
}

.bf-clerk.is-legit {
	animation: bf-clerk-nod .4s ease;
}

.bf-clerk.is-blocked {
	animation: bf-clerk-shield .5s ease;
}

.bf-clerk.is-breach {
	animation: bf-clerk-shake-no .45s ease;
}

@keyframes bf-clerk-nod {
	0% { transform: translateY(0); }
	45% { transform: translateY(.3rem); }
	100% { transform: translateY(0); }
}

@keyframes bf-clerk-shield {
	0% { transform: scale(1) rotate(0); }
	30% { transform: scale(1.12) rotate(-4deg); }
	60% { transform: scale(1.12) rotate(4deg); }
	100% { transform: scale(1) rotate(0); }
}

@keyframes bf-clerk-shake-no {
	0% { transform: translateX(0); }
	20% { transform: translateX(-.4rem); }
	40% { transform: translateX(.4rem); }
	60% { transform: translateX(-.25rem); }
	80% { transform: translateX(.25rem); }
	100% { transform: translateX(0); }
}

.bf-attack-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	display: block;
	width: 100%;
	padding: .7rem .5rem;
	border-radius: .7rem;
	font-size: .88rem;
	font-weight: 800;
	color: #fff;
	background: #c0473f;
	margin-bottom: 1rem;
	transition: opacity .15s ease;
}

.bf-attack-btn:hover {
	opacity: .92;
}

.bf-attack-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.bf-result {
	padding: .9rem 1rem;
	border-radius: .6rem;
	font-size: .84rem;
	font-weight: 700;
	line-height: 1.8;
	text-align: center;
	background: #f4f8fb;
	border-left: .25rem solid #cfd8e3;
	color: #445;
	margin-bottom: 1rem;
}

.bf-result.is-breach {
	background: #fff1f1;
	border-left-color: #c0473f;
	color: #a1352e;
}

.bf-result.is-blocked {
	background: #f2fbf4;
	border-left-color: #1f9e5c;
	color: #0d7a33;
}

.bf-reset-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	display: block;
	margin: 0 auto;
	padding: .5rem 1.2rem;
	border-radius: 999px;
	background: #eef2f5;
	color: #667;
	font-size: .78rem;
	font-weight: 700;
}

.bf-reset-btn:hover {
	background: #e2e8ed;
}

@media screen and (max-width: 640px) {
	#bf-demo { padding: 1rem .8rem 1.8rem; border-radius: .7rem; }
	.bf-panel { padding: 1.1rem .9rem 1rem; border-radius: .7rem; }
	.bf-badge { padding: .45rem 1.2rem; font-size: 1.05rem; white-space: normal; text-align: center; }
}
