/*
 * http_methods_playground.css
 * HTTPメソッド一覧｜体験デモ（GET/POST/PUT/PATCH/DELETEのべき等性プレイグラウンド）
 * 既存サイトのクラスと衝突しないよう hm- を接頭辞にしています。
 */

#hm-playground {
	box-sizing: border-box;
	margin: 1.4rem 0;
	padding: 1rem 1.1rem 2.2rem;
	background: #f4f8fb;
	border-radius: 1rem;
	scroll-margin-top: 90px;
}

#hm-playground *,
#hm-playground *::before,
#hm-playground *::after {
	box-sizing: border-box;
}

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

/* ---------- 見出しエリア ---------- */

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

.hm-badge {
	display: inline-block;
	padding: .6rem 2rem;
	border-radius: 999px;
	background: #0175d8;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: .06em;
	margin-bottom: .6rem;
	position: relative;
	box-shadow: 0 0 0 0 rgba(1, 117, 216, .45);
	animation: hm-badge-pulse 2.2s ease-out infinite;
}

@keyframes hm-badge-pulse {
	0% { box-shadow: 0 0 0 0 rgba(1, 117, 216, .45); }
	70% { box-shadow: 0 0 0 .55rem rgba(1, 117, 216, 0); }
	100% { box-shadow: 0 0 0 0 rgba(1, 117, 216, 0); }
}

h3.hm-headline {
	display: block;
	margin: .7rem auto 0;
	max-width: 30rem;
	font-size: 1.24rem;
	font-weight: 800;
	line-height: 1.6;
	color: #12233f;
	letter-spacing: .01em;
}

.hm-headline__mark {
	position: relative;
	color: #0175d8;
	white-space: nowrap;
}

.hm-headline__mark::after {
	content: "";
	position: absolute;
	left: -.05em;
	right: -.05em;
	bottom: -.06em;
	height: .32em;
	background: linear-gradient(90deg, #ffd23f, #ff9f43);
	border-radius: .2em;
	z-index: -1;
	opacity: .55;
}

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

/* ---------- パネル ---------- */

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

/* ---------- 状態（数字2つだけ） ---------- */

.hm-stats {
	width: 92%;
	margin: 0 auto 1.2rem;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .8rem;
}

.hm-stat {
	text-align: center;
	padding: .8rem .5rem;
	background: #f4f8fb;
	border-radius: .7rem;
}

.hm-stat__label {
	display: block;
	font-size: .74rem;
	font-weight: 700;
	color: #667;
	margin-bottom: .3rem;
}

.hm-stat__value {
	display: block;
	font-size: 1.7rem;
	font-weight: 800;
	color: #12233f;
	font-family: 'Courier New', monospace;
	transition: color .2s ease, transform .2s ease;
}

.hm-stat__value.is-pulse {
	color: #0175d8;
	transform: scale(1.18);
}

/* ---------- ボタン行 ---------- */

.hm-btn-row {
	width: 92%;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: .5rem;
}

.hm-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .3rem;
	padding: .65rem .3rem;
	border-radius: .8rem;
	font-size: .78rem;
	font-weight: 700;
	color: #fff;
	transition: opacity .15s ease, transform .15s ease;
}

.hm-btn:hover {
	opacity: .9;
	transform: translateY(-1px);
}

.hm-btn__method {
	font-size: .66rem;
	font-weight: 800;
	letter-spacing: .03em;
	opacity: .85;
}

.hm-btn--get {
	background: #0175d8;
}

.hm-btn--post {
	background: #1f9e5c;
}

.hm-btn--put {
	background: #e08a1f;
}

.hm-btn--patch {
	background: #7b5fe0;
}

.hm-btn--delete {
	background: #e0473f;
}

/* ---------- 結果パネル ---------- */

.hm-result {
	width: 92%;
	margin: 1.2rem auto 0;
	padding: .9rem 1rem;
	background: #f4f8fb;
	border-radius: .7rem;
	text-align: center;
}

.hm-result__badge {
	display: inline-block;
	padding: .3rem 1rem;
	border-radius: 999px;
	font-size: .82rem;
	font-weight: 800;
	color: #fff;
	background: #9aa4ad;
	margin-bottom: .55rem;
}

.hm-result__badge.hm-badge--safe {
	background: #0175d8;
}

.hm-result__badge.hm-badge--changes {
	background: #e0473f;
}

.hm-result__badge.hm-badge--idempotent {
	background: #1f9e5c;
}

.hm-result__badge.hm-badge--blocked {
	background: #9aa4ad;
}

.hm-result__text {
	font-size: .84rem;
	line-height: 1.85;
	color: #333;
	margin: 0;
}

/* ---------- リセット ---------- */

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

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

/* ---------- レスポンシブ ---------- */

@media screen and (max-width: 640px) {

	#hm-playground {
		padding: 1rem .8rem 1.8rem;
		border-radius: .7rem;
	}

	.hm-panel {
		padding: 1.1rem .9rem 1rem;
		border-radius: .7rem;
	}

	.hm-stats,
	.hm-btn-row,
	.hm-result {
		width: 100%;
	}

	.hm-btn-row {
		grid-template-columns: repeat(3, 1fr);
	}

	.hm-btn {
		font-size: .72rem;
		padding: .6rem .2rem;
	}

	.hm-badge {
		padding: .45rem 1.2rem;
		font-size: 1.05rem;
		white-space: normal;
		text-align: center;
	}

}
