/**
 * Better Wizard Modal Styles
 *
 * @package BetterWizard
 */

.btw-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s, visibility 0.3s;
}

.btw-modal.btw-modal-active {
	opacity: 1;
	visibility: visible;
}

.btw-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

.btw-modal-container {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 20px;
	z-index: 1;
}

.btw-modal-content {
	position: relative;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-width: 800px;
	max-height: 90vh;
	overflow-y: auto;
	width: 100%;
}

.btw-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #e0e0e0;
}

.btw-modal-header h2 {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
}

.btw-modal-close {
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: #666;
	transition: color 0.2s;
	padding: 0;
	width: 32px;
	height: 32px;
}

.btw-modal-close:hover {
	color: #000;
}

.btw-modal-body {
	padding: 24px;
	white-space: pre-line;
}

.btw-modal-loading {
	padding: 40px;
	text-align: center;
	font-size: 18px;
	color: #666;
}

.btw-modal-error {
	color: #d63638;
}

.btw-modal-curl {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

/* Modal content styling */
.btw-html,
.btw-text {
	line-height: 1.6;
	color: #333;
}

.btw-html h1,
.btw-html h2,
.btw-html h3,
.btw-html h4,
.btw-html h5,
.btw-html h6,
.btw-text h1,
.btw-text h2,
.btw-text h3,
.btw-text h4,
.btw-text h5,
.btw-text h6 {
	margin-top: 1.5em;
	margin-bottom: 0.5em;
	font-weight: 600;
}

.btw-html h1,
.btw-text h1 {
	font-size: 2em;
}

.btw-html h2,
.btw-text h2 {
	font-size: 1.75em;
}

.btw-html h3,
.btw-text h3 {
	font-size: 1.5em;
}

.btw-html h4,
.btw-text h4 {
	font-size: 1.25em;
}

.btw-html p,
.btw-text p {
	margin-bottom: 1em;
}

.btw-html ul,
.btw-html ol,
.btw-text ul,
.btw-text ol {
	margin-left: 2em;
	margin-bottom: 1em;
}

.btw-html li,
.btw-text li {
	margin-bottom: 0.5em;
}

.btw-html code,
.btw-text code {
	background: #f5f5f5;
	padding: 2px 6px;
	border-radius: 3px;
	font-family: Consolas, Monaco, monospace;
	font-size: 0.9em;
}

.btw-html pre,
.btw-text pre {
	background: #f5f5f5;
	padding: 16px;
	border-radius: 4px;
	overflow-x: auto;
	margin-bottom: 1em;
}

.btw-html pre code,
.btw-text pre code {
	background: none;
	padding: 0;
}

.btw-html blockquote,
.btw-text blockquote {
	border-left: 4px solid #0073aa;
	padding-left: 16px;
	margin-left: 0;
	color: #666;
	font-style: italic;
}

.btw-html hr,
.btw-text hr {
	border: none;
	border-top: 1px solid #e0e0e0;
	margin: 2em 0;
}

.btw-html strong,
.btw-text strong {
	font-weight: 600;
	color: #1a1a1a;
}

.btw-html em,
.btw-text em {
	font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
	.btw-modal-container {
		padding: 10px;
	}
	
	.btw-modal-content {
		max-height: 95vh;
	}
	
	.btw-modal-header,
	.btw-modal-body {
		padding: 16px;
	}
	
	.btw-modal-header h2 {
		font-size: 20px;
	}
}

/* Ensure proper line breaks in text content */
.btw-text {
	white-space: normal;
	line-height: 1.6;
	word-wrap: break-word;
}

.btw-text a {
	color: #0073aa;
	text-decoration: none;
	word-break: break-word;
}

.btw-text a:hover {
	color: #005a87;
	text-decoration: underline;
}

/* Ensure proper line breaks in streaming content */
.btw-streaming {
	white-space: pre-line;
	line-height: 1.6;
}

.btw-streaming br {
	line-height: 1.6;
}

/* CURL Command Display */
.btw-curl-container {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #ddd;
}

.btw-curl-command {
	background: #f5f5f5;
	padding: 15px;
	border-radius: 3px;
	overflow-x: auto;
	font-size: 12px;
	margin: 0;
	font-family: monospace;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* WordPress Spinner Animation */
.spinner {
	background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8Y2lyY2xlIGN4PSIxMCIgY3k9IjEwIiByPSI3LjUiIHN0cm9rZT0iIzYzNiIgc3Ryb2tlLXdpZHRoPSIyLjUiIGZpbGw9Im5vbmUiIHN0cm9rZS1kYXNoYXJyYXk9IjQ3LjEgMTUuNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIi8+Cjwvc3ZnPg==) center center no-repeat;
	background-size: 20px 20px;
	display: inline-block;
	width: 20px;
	height: 20px;
	vertical-align: middle;
	opacity: 0.7;
	animation: btw-spinner-rotation 0.6s linear infinite;
}

.spinner.is-active {
	display: inline-block;
}

@keyframes btw-spinner-rotation {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}


