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

.tnm-tool-ascii-art-gen {
	max-width: 960px;
	margin: 24px auto 48px;
	color: #243041;
	font-family: "BIZ UDPGothic", "Yu Gothic UI", sans-serif;
	--tnm-aag-output-line-height: 1.35em;
}

.tnm-aag__card {
	border: 1px solid #d6dde8;
	border-radius: 20px;
	padding: 28px;
	background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
	box-shadow: 0 18px 40px rgba(20, 40, 72, 0.08);
}

.tnm-aag__title {
	margin: 0;
	padding-bottom: 12px;
	border-bottom: 2px solid #0073aa;
	font-size: 1.75rem;
	line-height: 1.3;
	color: #1b2a41;
}

.tnm-aag__lead {
	margin: 14px 0 0;
	color: #4f6077;
}

.tnm-aag__switch-wrapper {
	display: inline-flex;
	justify-content: center;
	flex-wrap: nowrap;
	gap: 0;
	margin: 24px 0 0;
	padding: 6px;
	border: 1px solid #d3dae6;
	border-radius: 999px;
	background: #eef2f7;
	width: min(100%, 420px);
	box-sizing: border-box;
}

.tnm-aag__switch-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tnm-aag__switch-label {
	flex: 1 1 0;
	min-width: 0;
	padding: 10px 20px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
	color: #4f6077;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tnm-aag__switch-input:checked + .tnm-aag__switch-label {
	background: #0073aa;
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(0, 115, 170, 0.28);
}

.tnm-aag__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-top: 24px;
}

.tnm-aag__field--full {
	grid-column: 1 / -1;
}

.tnm-aag__label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
	color: #405065;
}

.tnm-aag__input,
.tnm-aag__select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #ccd6e2;
	border-radius: 10px;
	background: #ffffff;
	color: #243041;
	font-size: 1rem;
	box-sizing: border-box;
}

.tnm-aag__input--textarea {
	display: block;
	min-height: 48px;
	resize: none;
	overflow-x: auto;
	overflow-y: hidden;
	white-space: pre;
}

.tnm-aag__input:focus,
.tnm-aag__select:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.16);
}

.tnm-aag__validation {
	margin: 8px 2px 0;
	font-size: 0.82rem;
	line-height: 1.6;
	color: #c62828;
}

.tnm-aag__checkbox {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-weight: 700;
	color: #405065;
	user-select: none;
}

.tnm-aag__checkbox-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tnm-aag__checkbox-box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: 1px solid #9fb0c4;
	border-radius: 6px;
	background: #ffffff;
	box-shadow: inset 0 1px 2px rgba(20, 40, 72, 0.06);
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tnm-aag__checkbox-box::after {
	content: "";
	width: 10px;
	height: 6px;
	border-left: 2px solid #ffffff;
	border-bottom: 2px solid #ffffff;
	transform: rotate(-45deg) scale(0);
	transform-origin: center;
	transition: transform 0.15s ease;
}

.tnm-aag__checkbox-input:checked + .tnm-aag__checkbox-box {
	border-color: #0073aa;
	background: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.14);
}

.tnm-aag__checkbox-input:checked + .tnm-aag__checkbox-box::after {
	transform: rotate(-45deg) scale(1);
}

.tnm-aag__checkbox-input:focus-visible + .tnm-aag__checkbox-box {
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.18);
}

.tnm-aag__options {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

.tnm-aag__option-button {
	border: 1px solid #cdd8e4;
	border-radius: 10px;
	padding: 7px 12px;
	background: #ffffff;
	color: #405065;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.tnm-aag__option-button:hover,
.tnm-aag__option-button:focus {
	border-color: #0073aa;
	color: #0073aa;
	box-shadow: 0 8px 18px rgba(0, 115, 170, 0.12);
	transform: translateY(-1px);
}

.tnm-aag__option-button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.16);
}

.tnm-aag__toolbar {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
	margin-top: 20px;
	margin-bottom: -10px;
	padding: 0;
}

.tnm-aag__toolbar .tnm-aag__checkbox {
	margin-right: auto;
}

.tnm-aag__output-meta {
	margin: 0;
	font-size: 0.77rem;
	line-height: 1.4;
	color: #66798f;
	text-align: right;
	white-space: nowrap;
}

.tnm-aag__button {
	border: none;
	border-radius: 10px;
	padding: 8px 16px;
	background: #0073aa;
	color: #ffffff;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 10px 20px rgba(0, 115, 170, 0.2);
}

.tnm-aag__button:hover,
.tnm-aag__button:focus {
	background: #005f8d;
	transform: translateY(-1px);
}

.tnm-aag__button:disabled {
	background: #8ea0b5;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

.tnm-aag__button--success {
	background: #198754;
}

.tnm-aag__button--error {
	background: #c0392b;
}

.tnm-aag__output-wrap {
	margin-top: 20px;
}

.tnm-aag__output {
	display: block;
	max-height: calc(80 * var(--tnm-aag-output-line-height) + 36px);
	margin: 0;
	padding: 16px 18px;
	overflow-y: auto;
	overflow-x: auto;
	border: 1px solid #293647;
	border-radius: 14px;
	background: #17202b;
	color: #d7e2f0;
	font-family: "Consolas", "Monaco", monospace;
	font-size: 13px;
	line-height: var(--tnm-aag-output-line-height);
}

.tnm-aag--mode-simple .tnm-aag__output {
	padding-top: 12px;
	padding-bottom: 12px;
}

.tnm-aag__output[data-state="loading"] {
	color: #95abc2;
}

.tnm-aag__output[data-state="error"] {
	color: #ffb3ab;
}

.tnm-aag__note {
	margin: 8px 2px 0;
	font-size: 0.82rem;
	line-height: 1.6;
	color: #66798f;
}

.tnm-aag__modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(18, 31, 48, 0.46);
	z-index: 9999;
	box-sizing: border-box;
}

.tnm-aag__modal-card {
	width: min(100%, 420px);
	padding: 22px;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 22px 52px rgba(18, 31, 48, 0.18);
}

.tnm-aag__modal-title {
	margin: 0;
	font-size: 1.05rem;
	color: #1b2a41;
}

.tnm-aag__modal-body {
	margin: 12px 0 0;
	color: #4f6077;
	line-height: 1.7;
	font-size: 0.94rem;
}

.tnm-aag__modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 18px;
}

.tnm-aag__modal-button {
	border: none;
	border-radius: 10px;
	padding: 9px 15px;
	background: #0073aa;
	color: #ffffff;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.tnm-aag__modal-button:hover,
.tnm-aag__modal-button:focus {
	background: #005f8d;
	transform: translateY(-1px);
}

.tnm-aag__modal-button--ghost {
	background: #edf2f7;
	color: #405065;
}

.tnm-aag__modal-button--ghost:hover,
.tnm-aag__modal-button--ghost:focus {
	background: #dfe7f0;
	color: #243041;
}

.tnm-aag__details {
	margin-top: 32px;
}

.tnm-aag__section + .tnm-aag__section {
	margin-top: 28px;
}

.tnm-aag__section h3 {
	margin: 0 0 12px;
	padding-bottom: 10px;
	border-bottom: 2px solid #0073aa;
	color: #1b2a41;
	font-size: 1.35rem;
}

.tnm-aag__section h4 {
	margin: 20px 0 8px;
	color: #0073aa;
	font-size: 1.05rem;
}

.tnm-aag__section > p,
.tnm-aag__section > h4,
.tnm-aag__section > .tnm-aag__list {
	margin-left: 1rem;
}

.tnm-aag__section h4 + p,
.tnm-aag__section h4 + p + .tnm-aag__list {
	margin-left: 2rem;
}

.tnm-aag__section p {
	margin: 0;
	line-height: 1.75;
	color: #405065;
}

.tnm-aag__list {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	color: #405065;
	line-height: 1.75;
}

.tnm-aag__list li {
	position: relative;
	padding-left: 1.1rem;
}

.tnm-aag__list li + li {
	margin-top: 4px;
}

.tnm-aag__list--unordered li::before {
	content: "•";
	position: absolute;
	left: 0;
	top: 0.15em;
	font-size: 0.78em;
	color: #9aaabc;
}

.tnm-aag__list--ordered {
	counter-reset: tnm-aag-step;
}

.tnm-aag__list--ordered li::before {
	content: counter(tnm-aag-step) ".";
	position: absolute;
	left: 0;
	top: 0;
	color: #7e92a8;
	font-weight: 700;
	font-size: 0.85em;
}

.tnm-aag__list--ordered li {
	counter-increment: tnm-aag-step;
	padding-left: 1.5rem;
}

.tnm-aag__is-hidden {
	display: none;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact {
	margin: 16px auto 32px;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__card {
	border: none;
	padding: 10px;
	border-radius: 0;
	box-shadow: none;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__switch-wrapper {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	width: 100%;
	padding: 4px;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__switch-label {
	padding: 9px 8px;
	font-size: 0.88rem;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__grid {
	grid-template-columns: 1fr;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__field--full {
	grid-column: auto;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__toolbar {
	justify-content: space-between;
	gap: 12px;
	padding: 0;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__options {
	justify-content: stretch;
	gap: 8px;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__option-button {
	flex: 1 1 0;
	text-align: center;
	padding: 8px 10px;
	font-size: 0.84rem;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__output-meta {
	display: none;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__button {
	width: auto;
	flex: 0 0 auto;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__section > p,
.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__section > h4,
.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__section > .tnm-aag__list {
	margin-left: 0.75rem;
}

.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__section h4 + p,
.tnm-tool-ascii-art-gen.tnm-aag--compact .tnm-aag__section h4 + p + .tnm-aag__list {
	margin-left: 1.5rem;
}

@media (max-width: 767px) {
	.tnm-tool-ascii-art-gen {
		margin: 16px auto 32px;
	}

	.tnm-aag__card {
		border: none;
		padding: 20px;
		border-radius: 0;
		box-shadow: none;
	}

	.tnm-aag__switch-wrapper {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
		padding: 4px;
	}

	.tnm-aag__switch-label {
		padding: 9px 8px;
		font-size: 0.88rem;
	}

	.tnm-aag__grid {
		grid-template-columns: 1fr;
	}

	.tnm-aag__field--full {
		grid-column: auto;
	}

	.tnm-aag__toolbar {
		justify-content: space-between;
		gap: 12px;
		padding: 0;
	}

	.tnm-aag__options {
		justify-content: stretch;
		gap: 8px;
	}

	.tnm-aag__option-button {
		flex: 1 1 0;
		padding: 8px 10px;
		font-size: 0.84rem;
	}

	.tnm-aag__output-meta {
		display: none;
	}

	.tnm-aag__modal {
		padding: 14px;
	}

	.tnm-aag__modal-card {
		padding: 18px;
	}

	.tnm-aag__button {
		width: auto;
		flex: 0 0 auto;
	}

	.tnm-aag__section > p,
	.tnm-aag__section > h4,
	.tnm-aag__section > .tnm-aag__list {
		margin-left: 0.75rem;
	}

	.tnm-aag__section h4 + p,
	.tnm-aag__section h4 + p + .tnm-aag__list {
		margin-left: 1.5rem;
	}
}
