﻿/*_______________________________________________________________________________________________________________
 * |                                                                                                             |
 * |  ████████╗  ██████╗   ██████╗  ██╗      ███╗   ██╗ ███████╗ ███████╗ ████████╗        ███╗   ███╗ ██████╗   |
 * |  ╚══██╔══╝ ██╔═══██╗ ██╔═══██╗ ██║      ████╗  ██║ ██╔════╝ ██╔════╝ ╚══██╔══╝        ████╗ ████║ ██╔══██╗  |
 * |     ██║    ██║   ██║ ██║   ██║ ██║      ██╔██╗ ██║ █████╗   ███████╗    ██║    █████╗ ██╔████╔██║ ██████╔╝  |
 * |     ██║    ██║   ██║ ██║   ██║ ██║      ██║╚██╗██║ ██╔══╝   ╚════██║    ██║    ╚════╝ ██║╚██╔╝██║ ██╔═══╝   |
 * |     ██║    ╚██████╔╝ ╚██████╔╝ ███████╗ ██║ ╚████║ ███████╗ ███████║    ██║           ██║ ╚═╝ ██║ ██║       |
 * |     ╚═╝     ╚═════╝   ╚═════╝  ╚══════╝ ╚═╝  ╚═══╝ ╚══════╝ ╚══════╝    ╚═╝           ╚═╝     ╚═╝ ╚═╝       |
 * |                                                                                                             |
 * |    ███╗   ███╗  █████╗  ███╗   ███╗ ███████╗ ██████╗  ██╗ ███╗   ██╗      ██████╗  ██████╗  ███╗   ███╗     |
 * |    ████╗ ████║ ██╔══██╗ ████╗ ████║ ██╔════╝ ██╔══██╗ ██║ ████╗  ██║     ██╔════╝ ██╔═══██╗ ████╗ ████║     |
 * |    ██╔████╔██║ ███████║ ██╔████╔██║ █████╗   ██████╔╝ ██║ ██╔██╗ ██║     ██║      ██║   ██║ ██╔████╔██║     |
 * |    ██║╚██╔╝██║ ██╔══██║ ██║╚██╔╝██║ ██╔══╝   ██╔═══╝  ██║ ██║╚██╗██║     ██║      ██║   ██║ ██║╚██╔╝██║     |
 * |    ██║ ╚═╝ ██║ ██║  ██║ ██║ ╚═╝ ██║ ███████╗ ██║      ██║ ██║ ╚████║ ██╗ ╚██████╗ ╚██████╔╝ ██║ ╚═╝ ██║     |
 * |    ╚═╝     ╚═╝ ╚═╝  ╚═╝ ╚═╝     ╚═╝ ╚══════╝ ╚═╝      ╚═╝ ╚═╝  ╚═══╝ ╚═╝  ╚═════╝  ╚═════╝  ╚═╝     ╚═╝     |
 * |                                                                                                             |
 * |                                                                                                             |
 * |                                 (C) 2021- mamepin.com - ALL RIGHTS RESERVED                                 |
 * |                                         Unauthorized use prohibited                                         |
 * |_____________________________________________________________________________________________________________|
 */

.tnm-tool-block {
	max-width: 920px;
	margin: 16px auto 28px;
	padding: 0 14px;
	box-sizing: border-box;
	font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

.tnm-tool-card {
	max-width: 420px;
	margin: 16px auto 0;
	padding: 24px 20px;
	border: 2px solid #333;
	border-radius: 12px;
	background: #f9f9f9;
	text-align: center;
	font-family: sans-serif;
	box-sizing: border-box;
}

.tnm-tool-card__title {
	margin-bottom: 16px;
	font-size: 18px;
	font-weight: 700;
}

.tnm-tool-card__display {
	margin-bottom: 20px;
	font-size: 56px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.tnm-tool-card__controls {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
}

.tnm-tool-card__options {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
	max-width: 360px;
	text-align: left;
	justify-content: flex-start;
}

.tnm-tool-card__checkbox {
	display: flex;
	gap: 10px;
	align-items: center;
	font-size: 90%;
	line-height: 1.5;
	cursor: pointer;
	white-space: nowrap;
}

.tnm-tool-card__checkbox--compact {
	min-width: 100%;
}

.tnm-tool-card__checkbox input {
	margin: 0;
	flex: 0 0 auto;
}

.tnm-tool-card__input-group {
	display: inline-flex;
	gap: 8px;
	align-items: center;
}

.tnm-tool-card__time-inputs {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.tnm-tool-card__input-group input {
	width: 72px;
	padding: 8px 10px;
	border: 1px solid #999;
	border-radius: 8px;
	text-align: center;
	font-size: 16px;
}

.tnm-tool-card__buttons {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}

.tnm-tool-card__buttons button {
	padding: 10px 16px;
	border: 1px solid #333;
	border-radius: 8px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
}

.tnm-tool-card__buttons button:hover {
	background: #f0f0f0;
}

.tnm-tool-card__buttons button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	background: #f4f4f4;
}

.tnm-tool-card__laps {
	width: 100%;
	max-width: 280px;
	padding: 14px 14px 10px;
	border: 1px solid #d8d8d8;
	border-radius: 10px;
	background: #fff;
	text-align: left;
	box-sizing: border-box;
}

.tnm-tool-card__laps-title {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: #333;
}

.tnm-tool-card__laps-empty {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #666;
}

.tnm-tool-card__laps-list {
	margin: 0;
	padding-left: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: #333;
	box-sizing: border-box;
}

.tnm-tool-card__laps-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.tnm-tool-card__laps-label {
	font-weight: 700;
}

.tnm-tool-card__laps-values {
	color: #555;
}

.tnm-tool-card--timer {
	position: relative;
	border-color: #333;
	background:
		radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 52%),
		linear-gradient(145deg, #fbfbfb 0%, #f0f0f0 100%);
	box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.tnm-tool-card--timer .tnm-tool-card__display {
	padding: 16px 12px;
	border-radius: 18px;
	background: rgba(255, 255, 255, 0.88);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
	transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.tnm-tool-card--timer[data-timer-state="running"] .tnm-tool-card__display {
	color: #111;
	background: rgba(255, 255, 255, 0.96);
	transform: translateY(-1px);
}

.tnm-tool-card--timer[data-timer-state="paused"] .tnm-tool-card__display {
	color: #333;
	background: rgba(245, 245, 245, 0.96);
}

.tnm-tool-card--timer[data-timer-state="finished"] .tnm-tool-card__display {
	color: #111;
	background: rgba(242, 242, 242, 0.98);
}

.tnm-tool-card--timer [data-tnm-timer-start] {
	border-color: #333;
	background: #333;
	color: #fff;
}

.tnm-tool-card--timer [data-tnm-timer-start]:hover {
	background: #222;
}

.tnm-tool-card--timer [data-tnm-timer-pause] {
	border-color: #888;
	background: #f5f5f5;
	color: #333;
}

.tnm-tool-card--timer [data-tnm-timer-pause]:hover {
	background: #ebebeb;
}

.tnm-tool-card--timer [data-tnm-timer-reset] {
	border-color: #999;
	background: rgba(255, 255, 255, 0.9);
	color: #333;
}

.tnm-tool-card--timer [data-tnm-timer-reset]:hover {
	background: #f0f0f0;
}

.tnm-tool-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 18px;
	box-sizing: border-box;
}

.tnm-tool-modal[hidden] {
	display: none;
}

.tnm-tool-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.48);
	backdrop-filter: blur(4px);
}

.tnm-tool-modal__dialog {
	position: relative;
	width: min(100%, 420px);
	padding: 28px 24px 24px;
	border: 1px solid #333;
	border-radius: 24px;
	background:
		radial-gradient(circle at top, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 55%),
		linear-gradient(160deg, #fafafa 0%, #efefef 100%);
	box-shadow: 0 22px 50px rgba(0, 0, 0, 0.2);
	text-align: center;
	box-sizing: border-box;
	animation: tnm-tool-modal-in 0.18s ease-out;
}

.tnm-tool-modal__eyebrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	color: #333;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.tnm-tool-modal__title {
	margin: 0 0 10px;
	font-size: 28px;
	line-height: 1.25;
	color: #111;
}

.tnm-tool-modal__message {
	margin: 0;
	font-size: 15px;
	line-height: 1.8;
	color: #444;
}

.tnm-tool-modal__button {
	margin-top: 20px;
	padding: 11px 18px;
	border: 1px solid #333;
	border-radius: 999px;
	background: #333;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.tnm-tool-modal__button:hover {
	background: #222;
}

@keyframes tnm-tool-modal-in {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@media (min-width: 768px) {
	.tnm-tool-card {
		max-width: 420px;
		padding: 32px 28px;
	}

	.tnm-tool-card__title {
		font-size: 22px;
	}

	.tnm-tool-card__display {
		font-size: 72px;
		margin-bottom: 24px;
	}

	.tnm-tool-card__checkbox {
		font-size: 90%;
	}

	.tnm-tool-card__input-group input {
		width: 84px;
		font-size: 18px;
	}

	.tnm-tool-card__buttons button {
		padding: 12px 20px;
		font-size: 15px;
	}

	.tnm-tool-modal__dialog {
		padding: 32px 30px 28px;
	}

	.tnm-tool-modal__title {
		font-size: 32px;
	}

	.tnm-tool-card__laps-title {
		font-size: 15px;
	}

	.tnm-tool-card__laps-list,
	.tnm-tool-card__laps-empty {
		font-size: 14px;
	}
}


.tnm-tool-message-panel {
	max-width: 720px;
	margin: 24px auto 0;
	padding: 30px 34px 26px;
	border: 1px solid #e2d1b4;
	border-radius: 16px;
	background: linear-gradient(180deg, #fcf8f0 0%, #f8f1e4 100%);
	box-shadow: 0 8px 24px rgba(108, 84, 56, 0.08);
	text-align: left;
	color: #444;
	/*color: #5a4736;*/
	box-sizing: border-box;
}

.tnm-tool-message-panel__section + .tnm-tool-message-panel__section {
	margin-top: 22px;
}

.tnm-tool-message-panel__heading {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
	color: #473525;
}

.tnm-tool-message-panel__body,
.tnm-tool-message-panel__list {
	margin: 0;
	font-size: 15px;
	line-height: 1.95;
}

.tnm-tool-message-panel__body > *:first-child {
	margin-top: 0;
}

.tnm-tool-message-panel__body > *:last-child {
	margin-bottom: 0;
}

.tnm-tool-message-panel__body p {
	margin: 0 0 12px;
}

.tnm-tool-message-panel__list {
	margin: 0 0 14px;
	padding-left: 1.5em;
}

.tnm-tool-message-panel__list li + li {
	margin-top: 8px;
}

.tnm-tool-message-panel__list--ordered li + li {
	margin-top: 10px;
}

@media (max-width: 640px) {
	.tnm-tool-block {
		padding: 0 10px;
	}

	.tnm-tool-card__time-inputs {
		gap: 10px;
	}

	.tnm-tool-message-panel {
		padding: 22px 18px 20px;
		border-radius: 14px;
	}

	.tnm-tool-message-panel__heading {
		font-size: 16px;
	}

	.tnm-tool-message-panel__body,
	.tnm-tool-message-panel__list {
		font-size: 14px;
		line-height: 1.85;
	}

	.tnm-tool-modal {
		padding: 14px;
	}

	.tnm-tool-modal__dialog {
		padding: 24px 18px 22px;
		border-radius: 20px;
	}

	.tnm-tool-modal__title {
		font-size: 24px;
	}
}
