.tanshell-popup {
	position: fixed;
	inset: 0;
	z-index: var(--tsp-z, 99999);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	font-family: inherit;
}

.tanshell-popup[hidden] { display: none !important; }
.tanshell-popup.is-open { display: flex; }

.tanshell-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	animation: tsp-fade-in 0.2s ease-out;
}

.tanshell-popup__dialog {
	position: relative;
	max-width: 480px;
	width: 100%;
	background: #fff;
	color: #1f2937;
	border-radius: 10px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	padding: 32px 28px 28px;
	box-sizing: border-box;
	animation: tsp-pop-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.tanshell-popup__close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
	border-radius: 50%;
	padding: 0;
}
.tanshell-popup__close:hover {
	background: #f3f4f6;
	color: #111827;
}

.tanshell-popup__title {
	margin: 0 0 12px;
	font-size: 22px;
	line-height: 1.25;
	color: inherit;
	padding-right: 24px;
}

.tanshell-popup__content {
	font-size: 15px;
	line-height: 1.55;
	color: inherit;
}
.tanshell-popup__content p { margin: 0 0 10px; }
.tanshell-popup__content p:last-child { margin-bottom: 0; }
.tanshell-popup__content a { color: #2563eb; text-decoration: underline; }

.tanshell-popup__actions {
	margin-top: 20px;
	display: flex;
	justify-content: flex-end;
}

.tanshell-popup__btn {
	display: inline-block;
	padding: 10px 20px;
	background: #111827;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	line-height: 1.2;
	transition: background 0.15s ease, transform 0.15s ease;
}
.tanshell-popup__btn:hover {
	background: #374151;
	color: #fff;
}
.tanshell-popup__btn:active { transform: translateY(1px); }

.tanshell-popup__dialog:focus { outline: none; }

.tanshell-popup__close:focus-visible,
.tanshell-popup__btn:focus-visible,
.tanshell-popup__content a:focus-visible,
.tanshell-popup__dialog:focus-visible {
	outline: 3px solid #2563eb;
	outline-offset: 3px;
	box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.25);
	border-radius: 6px;
}
.tanshell-popup__close:focus-visible {
	background: #eef4ff;
	color: #1d4ed8;
}

@media (prefers-contrast: more) {
	.tanshell-popup__close:focus-visible,
	.tanshell-popup__btn:focus-visible,
	.tanshell-popup__content a:focus-visible,
	.tanshell-popup__dialog:focus-visible {
		outline-width: 4px;
		outline-color: CanvasText;
		box-shadow: none;
	}
}

@keyframes tsp-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}
@keyframes tsp-pop-in {
	from { opacity: 0; transform: translateY(8px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.tanshell-popup__overlay,
	.tanshell-popup__dialog { animation: none; }
}

@media (max-width: 480px) {
	.tanshell-popup__dialog { padding: 24px 18px 20px; }
	.tanshell-popup__title  { font-size: 19px; }
}
