.toret-popup-popup-scope {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 15px;
	box-sizing: border-box;
}

.toret-popup-popup-scope.toret-popup-overlay--active {
	display: flex;
}

.toret-popup-popup-scope .toret-popup-content {
	background-color: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	animation: myPopupFadeIn 0.3s ease-out;
}

@keyframes myPopupFadeIn {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.toret-popup-popup-scope .toret-popup-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #eee;
	padding-bottom: 10px;
	margin-bottom: 15px;
}

.toret-popup-popup-scope .toret-popup-title {
	margin: 0;
	font-size: 1.5em;
	color: #333;
}

.toret-popup-popup-scope .toret-popup-close {
	background: none;
	border: none;
	font-size: 1.8em;
	line-height: 1;
	color: #888;
	cursor: pointer;
	padding: 5px;
}

.toret-popup-popup-scope .toret-popup-close:hover,
.toret-popup-popup-scope .toret-popup-close:focus {
	color: #333;
	outline: none;
}

.toret-popup-popup-scope .toret-popup-body {
	margin-bottom: 20px;
	line-height: 1.6;
	color: #555;
}
.toret-popup-popup-scope .toret-popup-body p {
	margin-top: 0;
}
.toret-popup-popup-scope .toret-popup-body img {
	max-width: 100%;
	height: auto;
}


.toret-popup-popup-scope .toret-popup-footer {
	border-top: 1px solid #eee;
	padding-top: 15px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.toret-popup-popup-scope .toret-popup-footer-button {
	padding: 8px 15px;
	border: 1px solid #ccc;
	background-color: #f0f0f0;
	color: #333;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9em;
}

.toret-popup-popup-scope .toret-popup-footer-button:hover {
	background-color: #e0e0e0;
	border-color: #bbb;
}

.toret-popup-popup-scope .toret-popup-footer-button.primary {
	background-color: #0073aa;
	color: #fff;
	border-color: #0073aa;
}
.toret-popup-popup-scope .toret-popup-footer-button.primary:hover {
	background-color: #005a8e;
}

@media (max-width: 480px) {
	.toret-popup-popup-scope .toret-popup-content {
		width: 95%;
		padding: 15px;
	}
	.toret-popup-popup-scope .toret-popup-title {
		font-size: 1.2em;
	}
	.toret-popup-popup-scope .toret-popup-footer {
		flex-direction: column;
	}
	.toret-popup-popup-scope .toret-popup-footer-button {
		width: 100%;
		margin-bottom: 5px;
	}
	.toret-popup-popup-scope .toret-popup-footer-button:last-child {
		margin-bottom: 0;
	}
}

.toret-popup-content.toret-popup-size-small {
	width: 300px;
	max-width: 90%;
}

.toret-popup-content.toret-popup-size-medium {
	width: 500px;
	max-width: 90%;
}

.toret-popup-content.toret-popup-size-large {
	width: 800px;
	max-width: 90%;
}

.toret-popup-content.toret-popup-size-extra-large {
	width: 1140px;
	max-width: 95%;
}

.toret-popup-content.toret-popup-size-fullscreen {
	width: 95%;
	max-width: 98%;
}

@media (max-width: 1200px) {
	.toret-popup-content.toret-popup-size-extra-large {
		width: 960px;
	}
}

@media (max-width: 992px) {
	.toret-popup-content.toret-popup-size-large,
	.toret-popup-content.toret-popup-size-extra-large {
		width: 90%;
	}
}

@media (max-width: 768px) {
	.toret-popup-content.toret-popup-size-medium,
	.toret-popup-content.toret-popup-size-large,
	.toret-popup-content.toret-popup-size-extra-large {
		width: 90%;
		margin: 10px;
	}
}

@media (max-width: 576px) {
	.toret-popup-content.toret-popup-size-small,
	.toret-popup-content.toret-popup-size-medium,
	.toret-popup-content.toret-popup-size-large,
	.toret-popup-content.toret-popup-size-extra-large {
		width: calc(100% - 20px);
		margin: 10px auto;
		padding: 15px;
	}
	.toret-popup-header {
		padding-bottom: 10px;
	}
	.toret-popup-body {
	}
}

.toret-popup-spinner {
	display: none;
	box-sizing: border-box;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.2em;/
	height: 1.2em;
	margin-top: -0.6em;
	margin-left: -0.6em;

	border: 2px solid rgba(0, 0, 0, 0.2);
	border-top-color: currentColor;
	border-radius: 50%;
	animation: toretPopupSpin 0.7s linear infinite;
}

@keyframes toretPopupSpin {
	to {
		transform: rotate(360deg);
	}
}

.toret-popup-button-text {
	transition: opacity 0.1s ease-out;
}

.toret-popup-button--loading .toret-popup-spinner {
	display: block;
}

.toret-popup-button--loading .toret-popup-button-text {
	opacity: 0;
}

.toret-popup-button--loading:disabled {
	opacity: 1;
}

.toret-popup-external-close-button {
	position: absolute;
	top: 0;
	right: 10px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: #333;
	color: white;
	border: none;
	font-size: 20px;
	line-height: 30px;
	text-align: center;
	cursor: pointer;
	z-index: 10;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
}

.toret-popup-external-close-button:focus{
	outline: none;
}
