/**
 * SiteFlush Admin Styles
 *
 * @package SiteFlush
 */

.siteflush-page-header {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin-bottom: 8px;
}

.siteflush-page-header-main {
	display: flex;
	align-items: center;
	gap: 12px;
}

.siteflush-page-logo {
	width: 32px;
	height: 32px;
	object-fit: contain;
}

.siteflush-page-header h1 {
	margin: 0;
}

.siteflush-complete-notice {
	width: 100%;
	box-sizing: border-box;
	display: block !important;
	float: none !important;
	clear: both !important;
	margin: 12px 0 0 0;
}

/* Warning Panel */
.siteflush-warning-panel {
	background: #fff;
	border: 3px solid #dc3232;
	border-radius: 4px;
	padding: 20px;
	margin: 20px 0;
	box-shadow: 0 2px 8px rgba(220, 50, 50, 0.15);
}

.siteflush-warning-panel h2 {
	margin-top: 0;
	color: #dc3232;
	font-size: 18px;
}

.siteflush-warning-panel p {
	font-size: 14px;
	line-height: 1.6;
	margin: 10px 0;
}

.siteflush-warning-panel p:last-child {
	margin-bottom: 0;
}

/* Environment Check */
.siteflush-env-check {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 20px;
	margin: 20px 0;
}

.siteflush-env-check h3 {
	margin-top: 0;
	font-size: 16px;
}

.siteflush-env-check .form-table {
	margin-top: 15px;
}

.siteflush-env-check .form-table th {
	padding-left: 0;
	font-weight: 600;
	width: 200px;
}

.siteflush-env-check .form-table td {
	padding-left: 0;
}

.siteflush-env-check code {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 13px;
}

/* Form Container */
.siteflush-form-container {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 20px;
	margin: 20px 0;
}

.siteflush-form-container h3 {
	margin-top: 0;
	font-size: 16px;
}

.siteflush-form-container .form-table th {
	padding-left: 0;
	font-weight: 600;
	width: 200px;
	vertical-align: middle;
}

.siteflush-form-container .form-table td {
	padding-left: 0;
}

.siteflush-form-container input[type="text"] {
	font-family: monospace;
	font-size: 14px;
}

.siteflush-form-container .description {
	font-style: italic;
	color: #646970;
}

/* Submit Button */
#siteflush-submit {
	background: #dc3232;
	border-color: #dc3232;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	padding: 8px 24px;
	height: auto;
	transition: all 0.2s ease;
}

#siteflush-submit:hover:not(:disabled) {
	background: #c00;
	border-color: #c00;
	color: #fff;
}

#siteflush-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #dcdcde;
	border-color: #dcdcde;
	color: #646970;
}

/* Notices */
.notice.inline {
	margin: 15px 0 0 0;
	padding: 12px;
}

/* Success Message */
.siteflush-success-notice {
	background: #d5f5e3;
	border-left: 4px solid #00a32a;
	padding: 15px;
	margin: 20px 0;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.siteflush-success-notice h3 {
	margin: 0 0 10px 0;
	color: #00a32a;
	font-size: 16px;
}

.siteflush-success-notice p {
	margin: 5px 0;
	line-height: 1.6;
}

.siteflush-success-notice p:last-child {
	margin-bottom: 0;
}

/* Progress Modal */
.siteflush-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.8);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
	backdrop-filter: blur(4px);
}

.siteflush-modal.active {
	opacity: 1;
}

.siteflush-modal-content {
	background: #fff;
	border-radius: 8px;
	padding: 30px;
	max-width: 600px;
	width: 90%;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	animation: slideIn 0.4s ease-out;
}

.siteflush-confirm-content {
	max-width: 520px;
	text-align: center;
}

.siteflush-confirm-actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
}

.siteflush-confirm-actions .button {
	min-width: 120px;
}

@keyframes slideIn {
	from {
		transform: translateY(-30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.siteflush-modal-header {
	text-align: center;
	margin-bottom: 30px;
}

.siteflush-modal-header h2 {
	margin: 0 0 10px 0;
	padding-bottom: 15px;
	font-size: 24px;
	color: #1d2327;
}

.siteflush-progress-message {
	color: #646970;
	font-size: 14px;
	margin: 0;
}

/* Progress Bar Container */
.siteflush-progress-container {
	margin-bottom: 30px;
	position: relative;
}

.siteflush-progress-bar {
	height: 30px;
	background: #f0f0f1;
	border-radius: 15px;
	overflow: hidden;
	position: relative;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.siteflush-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
	border-radius: 15px;
	transition: width 0.5s ease;
	position: relative;
	overflow: hidden;
}

.siteflush-progress-fill::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 255, 255, 0.3) 50%,
		transparent 100%
	);
	animation: shimmer 2s infinite;
}

@keyframes shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.siteflush-progress-percentage {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
	text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* Steps List */
.siteflush-steps-container {
	max-height: 350px;
	overflow-y: auto;
	padding: 0 5px;
}

.siteflush-steps-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.siteflush-step {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	margin-bottom: 8px;
	background: #f6f7f7;
	border-radius: 6px;
	transition: all 0.3s ease;
	border-left: 3px solid transparent;
}

.siteflush-step.active {
	background: #e5f3ff;
	border-left-color: #2271b1;
	animation: pulse 1.5s ease-in-out infinite;
}

.siteflush-step.completed {
	background: #e6f4ea;
	border-left-color: #00a32a;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.8;
	}
}

.siteflush-step-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-right: 12px;
	border-radius: 50%;
	background: #fff;
	flex-shrink: 0;
}

.siteflush-step .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
	color: #646970;
}

.siteflush-step.active .dashicons {
	color: #2271b1;
	animation: spin 1s linear infinite;
}

.siteflush-step.completed .dashicons {
	color: #00a32a;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

.siteflush-step-label {
	font-size: 14px;
	color: #1d2327;
	font-weight: 500;
}

.siteflush-step.active .siteflush-step-label {
	font-weight: 600;
}

.siteflush-step.completed .siteflush-step-label {
	color: #00a32a;
}

/* Scrollbar Styling */
.siteflush-steps-container::-webkit-scrollbar {
	width: 8px;
}

.siteflush-steps-container::-webkit-scrollbar-track {
	background: #f0f0f1;
	border-radius: 4px;
}

.siteflush-steps-container::-webkit-scrollbar-thumb {
	background: #c3c4c7;
	border-radius: 4px;
}

.siteflush-steps-container::-webkit-scrollbar-thumb:hover {
	background: #a7aaad;
}

/* Responsive */
@media screen and (max-width: 782px) {
	.siteflush-warning-panel,
	.siteflush-env-check,
	.siteflush-form-container {
		padding: 15px;
	}

	.siteflush-env-check .form-table th,
	.siteflush-form-container .form-table th {
		width: auto;
	}

	.siteflush-modal-content {
		padding: 20px;
		max-width: 95%;
	}

	.siteflush-confirm-actions {
		flex-direction: column;
	}

	.siteflush-modal-header h2 {
		font-size: 20px;
	}

	.siteflush-steps-container {
		max-height: 250px;
	}
}
