/* TurboShrink Frontend Styles */

.turboshrink-pdf-block {
	max-width: 600px;
	margin: 20px auto;
	padding: 30px;
	background: linear-gradient(135deg, #f9fafb, #f3f4f6);
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.turboshrink-pdf-block h2 {
	color: #1f2937;
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 25px 0;
	text-align: center;
}

/* Upload Area */
.turboshrink-upload-area {
	border: 3px dashed #007cba;
	border-radius: 12px;
	padding: 50px 30px;
	text-align: center;
	background: white;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-bottom: 25px;
	position: relative;
	overflow: hidden;
}

.turboshrink-upload-area::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(circle, rgba(0, 124, 186, 0.05) 1px, transparent 1px);
	background-size: 20px 20px;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.turboshrink-upload-area:hover {
	border-color: #0056b3;
	background: #f0f7ff;
}

.turboshrink-upload-area:hover::before {
	opacity: 1;
}

.turboshrink-upload-area.drag-over {
	border-color: #0056b3;
	background: #f0f7ff;
	transform: scale(1.02);
}

.turboshrink-upload-area input[type="file"] {
	display: none;
}

.turboshrink-upload-area p {
	margin: 15px 0 0 0;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.6;
}

.upload-icon {
	font-size: 48px;
	margin-bottom: 10px;
	color: #007cba;
}

/* Options Section */
.turboshrink-options {
	background: white;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 20px;
	border: 1px solid #e5e7eb;
}

.turboshrink-options label {
	display: block;
	margin-bottom: 12px;
	font-weight: 600;
	color: #374151;
	font-size: 14px;
}

.turboshrink-options select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	background: white;
	color: #374151;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.turboshrink-options select:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.turboshrink-options input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin-right: 8px;
	cursor: pointer;
	accent-color: #007cba;
}

.checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	margin-top: 15px;
}

/* Submit Button */
.turboshrink-submit-btn {
	width: 100%;
	padding: 14px 20px;
	background: linear-gradient(135deg, #007cba, #0056b3);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 6px rgba(0, 124, 186, 0.3);
	margin-top: 10px;
}

.turboshrink-submit-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 124, 186, 0.4);
}

.turboshrink-submit-btn:active:not(:disabled) {
	transform: translateY(0);
}

.turboshrink-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Progress Section */
#turboshrink-progress {
	margin-top: 20px;
	padding: 20px;
	background: white;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.turboshrink-progress-bar {
	width: 100%;
	height: 8px;
	background: #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
	margin-bottom: 15px;
}

.turboshrink-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #007cba, #0056b3);
	width: 0%;
	transition: width 0.3s ease;
	box-shadow: 0 0 10px rgba(0, 124, 186, 0.5);
}

#turboshrink-progress p {
	margin: 0;
	color: #6b7280;
	font-size: 14px;
	text-align: center;
	animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

/* Result Section */
#turboshrink-result {
	margin-top: 20px;
	padding: 25px;
	background: #f0fdf4;
	border: 2px solid #22c55e;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(34, 197, 94, 0.1);
}

.turboshrink-result-content {
	animation: slideDown 0.3s ease;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.turboshrink-result-content h3 {
	color: #15803d;
	margin: 0 0 15px 0;
	font-size: 18px;
}

.turboshrink-result-content p {
	margin: 10px 0;
	color: #166534;
	font-size: 14px;
	line-height: 1.6;
}

.turboshrink-result-content strong {
	color: #15803d;
	font-weight: 600;
}

#download-link {
	display: inline-block;
	margin-top: 15px;
	padding: 12px 24px;
	background: linear-gradient(135deg, #22c55e, #16a34a);
	color: white;
	border: none;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

#download-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Error State */
.turboshrink-error {
	background: #fef2f2 !important;
	border-color: #fca5a5 !important;
	color: #991b1b;
	padding: 15px;
	border-radius: 6px;
	margin: 15px 0;
	font-size: 14px;
	line-height: 1.6;
}

/* Toast Notifications */
.turboshrink-toast {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 15px 20px;
	background: white;
	border-left: 4px solid #007cba;
	border-radius: 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 10000;
	animation: slideInRight 0.3s ease;
	max-width: 350px;
	font-size: 14px;
	line-height: 1.5;
}

.turboshrink-toast.success {
	border-color: #22c55e;
	background: #f0fdf4;
	color: #166534;
}

.turboshrink-toast.error {
	border-color: #ef4444;
	background: #fef2f2;
	color: #991b1b;
}

@keyframes slideInRight {
	from {
		transform: translateX(400px);
		opacity: 0;
	}
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.turboshrink-pdf-block {
		background: linear-gradient(135deg, #1f2937, #111827);
		border-color: #374151;
		color: #f3f4f6;
	}

	.turboshrink-pdf-block h2 {
		color: #f3f4f6;
	}

	.turboshrink-upload-area {
		background: #1f2937;
		border-color: #0b7cba;
	}

	.turboshrink-upload-area:hover {
		background: #111827;
		border-color: #0056b3;
	}

	.turboshrink-upload-area p {
		color: #d1d5db;
	}

	.turboshrink-options {
		background: #1f2937;
		border-color: #374151;
		color: #f3f4f6;
	}

	.turboshrink-options select {
		background: #111827;
		border-color: #374151;
		color: #f3f4f6;
	}

	#turboshrink-progress {
		background: #1f2937;
		border-color: #374151;
	}

	#turboshrink-progress p {
		color: #d1d5db;
	}

	#turboshrink-result {
		background: rgba(34, 197, 94, 0.1);
		border-color: #22c55e;
	}

	.turboshrink-result-content h3 {
		color: #86efac;
	}

	.turboshrink-result-content p {
		color: #9ede8b;
	}

	.turboshrink-toast {
		background: #1f2937;
		border-color: #007cba;
		color: #f3f4f6;
	}
}

/* Responsive */
@media (max-width: 768px) {
	.turboshrink-pdf-block {
		margin: 10px;
		padding: 20px;
	}

	.turboshrink-pdf-block h2 {
		font-size: 20px;
	}

	.turboshrink-upload-area {
		padding: 30px 20px;
	}

	.turboshrink-toast {
		right: 10px;
		left: 10px;
		top: 10px;
		max-width: none;
	}

	#download-link {
		width: 100%;
		text-align: center;
	}
}
