/**
 * BotBunch Image Resizer - Premium Frontend UI Stylesheet
 */

/* Import Outfit and Inter fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
	/* Dark Mode Theme Variables (Default) */
	--bb-bg: #090d16;
	--bb-surface: rgba(17, 22, 37, 0.7);
	--bb-surface-solid: #111625;
	--bb-border: rgba(255, 255, 255, 0.08);
	--bb-border-focus: rgba(0, 229, 255, 0.4);
	--bb-text: #f1f5f9;
	--bb-text-muted: #94a3b8;
	
	/* Core Brand Accent Colors */
	--bb-primary: #ff3366;
	--bb-secondary: #00e5ff;
	--bb-primary-gradient: linear-gradient(135deg, #ff3366, #ff7b00);
	--bb-accent-gradient: linear-gradient(135deg, #00e5ff, #7f00ff);
	--bb-success: #10b981;
	--bb-error: #ef4444;
	
	/* Shadows and Blurs */
	--bb-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	--bb-glow: 0 0 20px rgba(0, 229, 255, 0.15);
	--bb-glass-blur: blur(16px);
	--bb-radius: 12px;
	--bb-font-sans: 'Inter', sans-serif;
	--bb-font-title: 'Outfit', sans-serif;
}

/* Light Mode Theme Override Variables */
.botbunch-frontend-page.light-mode {
	--bb-bg: #f8fafc;
	--bb-surface: rgba(255, 255, 255, 0.8);
	--bb-surface-solid: #ffffff;
	--bb-border: rgba(0, 0, 0, 0.08);
	--bb-border-focus: rgba(255, 51, 102, 0.4);
	--bb-text: #0f172a;
	--bb-text-muted: #64748b;
	--bb-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	--bb-glow: 0 0 20px rgba(255, 51, 102, 0.1);
}

/* General Layout resets inside plugin wrapper */
.botbunch-frontend-page {
	background-color: var(--bb-bg);
	color: var(--bb-text);
	font-family: var(--bb-font-sans);
	font-size: 15px;
	line-height: 1.6;
	padding: 40px 20px;
	min-height: 100vh;
	transition: background-color 0.3s ease, color 0.3s ease;
	box-sizing: border-box;
}

.botbunch-frontend-page *, 
.botbunch-frontend-page *::before, 
.botbunch-frontend-page *::after {
	box-sizing: border-box;
}

.botbunch-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* Glassmorphism Panel Template */
.glass-panel {
	background: var(--bb-surface);
	border: 1px solid var(--bb-border);
	backdrop-filter: var(--bb-glass-blur);
	-webkit-backdrop-filter: var(--bb-glass-blur);
	border-radius: var(--bb-radius);
	box-shadow: var(--bb-shadow);
	padding: 24px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
	border-color: rgba(255, 255, 255, 0.12);
}

/* Custom Scrollbars */
.botbunch-frontend-page ::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
.botbunch-frontend-page ::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.05);
	border-radius: 4px;
}
.botbunch-frontend-page ::-webkit-scrollbar-thumb {
	background: var(--bb-text-muted);
	border-radius: 4px;
	opacity: 0.5;
}
.botbunch-frontend-page ::-webkit-scrollbar-thumb:hover {
	background: var(--bb-primary);
}

/* Header Styling */
.botbunch-tool-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 25px;
	margin-bottom: 35px;
	border-bottom: 1px solid var(--bb-border);
}

.botbunch-brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.botbunch-logo-icon {
	font-size: 28px;
	background: var(--bb-primary-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	filter: drop-shadow(0 2px 4px rgba(255,51,102,0.3));
}

.botbunch-brand h2 {
	font-family: var(--bb-font-title);
	font-weight: 800;
	font-size: 22px;
	margin: 0;
	line-height: 1.1;
	letter-spacing: -0.5px;
}

.botbunch-brand span {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	color: var(--bb-primary);
	font-weight: 700;
}

/* Navigation Links */
.botbunch-quick-links {
	display: flex;
	gap: 8px;
	background: rgba(0,0,0,0.15);
	padding: 4px;
	border-radius: 8px;
	border: 1px solid var(--bb-border);
}

.botbunch-quick-links a {
	color: var(--bb-text-muted);
	text-decoration: none;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.botbunch-quick-links a:hover,
.botbunch-quick-links a.active {
	color: var(--bb-text);
	background: rgba(255, 255, 255, 0.08);
}

.botbunch-quick-links a.active {
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Theme Toggle button */
.botbunch-theme-toggle {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--bb-border);
	background: var(--bb-surface);
	cursor: pointer;
	transition: all 0.2s ease;
}

.botbunch-theme-toggle:hover {
	transform: scale(1.05);
	border-color: var(--bb-primary);
}

.theme-icon-light { display: none; }
.theme-icon-dark { display: block; }
.light-mode .theme-icon-light { display: block; }
.light-mode .theme-icon-dark { display: none; }

/* Intro text */
.botbunch-tool-intro {
	text-align: center;
	margin-bottom: 40px;
}

.botbunch-tool-intro h1 {
	font-family: var(--bb-font-title);
	font-weight: 700;
	font-size: 36px;
	margin: 0 0 10px 0;
	letter-spacing: -1px;
}

.botbunch-tool-intro h1::after {
	content: '';
	display: block;
	width: 60px;
	height: 4px;
	background: var(--bb-primary-gradient);
	margin: 15px auto 0 auto;
	border-radius: 2px;
}

.botbunch-tool-intro .subtitle {
	color: var(--bb-text-muted);
	font-size: 16px;
	max-width: 600px;
	margin: 0 auto;
}

/* Grid splits */
.botbunch-editor-grid {
	display: grid;
	grid-template-columns: 7fr 5fr;
	gap: 30px;
	align-items: start;
	margin-bottom: 50px;
}

@media (max-width: 900px) {
	.botbunch-editor-grid {
		grid-template-columns: 1fr;
	}
}

/* Dropzone styling */
.botbunch-dropzone {
	border: 3px dashed var(--bb-border);
	border-radius: var(--bb-radius);
	padding: 60px 40px;
	text-align: center;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: rgba(0,0,0,0.1);
	cursor: pointer;
}

.botbunch-dropzone:hover, 
.botbunch-dropzone.dragover {
	border-color: var(--bb-primary);
	background: rgba(255, 51, 102, 0.03);
	box-shadow: 0 0 30px rgba(255, 51, 102, 0.05);
}

.upload-icon {
	font-size: 60px;
	margin-bottom: 20px;
	display: inline-block;
	animation: bounce 2s infinite;
}

.botbunch-dropzone h3 {
	font-family: var(--bb-font-title);
	font-size: 20px;
	margin: 0 0 10px 0;
}

.botbunch-dropzone p {
	color: var(--bb-text-muted);
	margin: 0 0 20px 0;
	font-size: 13px;
}

.or-separator {
	display: block;
	margin: 15px 0;
	font-size: 12px;
	color: var(--bb-text-muted);
	font-weight: 700;
}

.select-file-btn {
	display: inline-block;
	background: var(--bb-primary-gradient) !important;
	color: #fff !important;
	font-weight: 600;
	padding: 12px 30px;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border: none;
}

.select-file-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255, 51, 102, 0.4);
}

.batch-upload-toggle {
	margin-top: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 13px;
	color: var(--bb-text-muted);
}

/* Image Preview Section */
.botbunch-workspace-card {
	min-height: 480px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.botbunch-editor-workspace {
	width: 100%;
}

.botbunch-preview-container {
	position: relative;
	width: 100%;
	height: 380px;
	background: #05070a;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.preview-image-wrapper {
	width: 100%;
	height: 100%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.preview-image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
	display: block;
	transition: transform 0.3s ease;
}

/* Crop bounding box */
.crop-overlay-box {
	position: absolute;
	border: 2px dashed var(--bb-secondary);
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
	z-index: 40;
	cursor: move;
}

.crop-resizers {
	width: 100%;
	height: 100%;
	position: relative;
}

.resizer {
	width: 10px;
	height: 10px;
	background: var(--bb-secondary);
	position: absolute;
	border-radius: 50%;
}
.resizer.tl { top: -5px; left: -5px; cursor: nwse-resize; }
.resizer.tr { top: -5px; right: -5px; cursor: nesw-resize; }
.resizer.bl { bottom: -5px; left: -5px; cursor: nesw-resize; }
.resizer.br { bottom: -5px; right: -5px; cursor: nwse-resize; }

/* Image Metadata hud */
.botbunch-hud-info {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	background: rgba(0, 0, 0, 0.2);
	border: 1px solid var(--bb-border);
	padding: 12px 16px;
	border-radius: 8px;
}

.hud-item {
	display: flex;
	flex-direction: column;
}

.hud-label {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--bb-text-muted);
}

.hud-value {
	font-family: monospace;
	font-size: 13px;
	font-weight: 600;
}

/* Batch files display */
.batch-workspace-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	border-bottom: 1px solid var(--bb-border);
	padding-bottom: 10px;
}

.batch-workspace-header h3 {
	margin: 0;
	font-family: var(--bb-font-title);
	font-size: 16px;
}

.batch-files-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 12px;
	max-height: 400px;
	overflow-y: auto;
	padding-right: 5px;
}

.batch-item-card {
	background: var(--bb-surface-solid);
	border: 1px solid var(--bb-border);
	border-radius: 8px;
	padding: 8px;
	position: relative;
	text-align: center;
}

.batch-thumb-wrapper {
	width: 100%;
	height: 80px;
	background: #05070a;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 6px;
}

.batch-thumb-wrapper img {
	max-width: 100%;
	max-height: 100%;
	object-fit: cover;
}

.batch-item-name {
	font-size: 10px;
	color: var(--bb-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

.batch-item-remove {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 16px;
	height: 16px;
	background: var(--bb-error);
	color: #fff;
	font-size: 9px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.batch-item-status-badge {
	position: absolute;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 8px;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: bold;
	color: #fff;
	background: #555;
}
.batch-item-status-badge.success { background: var(--bb-success); }
.batch-item-status-badge.processing { background: var(--bb-secondary); }

/* Accordion Options */
.botbunch-accordion {
	margin-bottom: 20px;
}

.accordion-item {
	border: 1px solid var(--bb-border);
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
}

.accordion-header {
	background: rgba(255, 255, 255, 0.02);
	padding: 14px 18px;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.accordion-header:hover {
	background: rgba(255, 255, 255, 0.05);
}

.accordion-header h4 {
	margin: 0;
	font-family: var(--bb-font-title);
	font-size: 14px;
	font-weight: 600;
}

.accordion-content {
	display: none;
	padding: 18px;
	border-top: 1px solid var(--bb-border);
	background: rgba(0,0,0,0.08);
}

.accordion-item.active .accordion-content {
	display: block;
}

.accordion-item.active .accordion-header {
	background: rgba(255, 51, 102, 0.03);
	border-left: 3px solid var(--bb-primary);
}

/* Control Fields elements */
.control-row {
	margin-bottom: 16px;
}

.control-row:last-child {
	margin-bottom: 0;
}

.control-row label {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	color: var(--bb-text-muted);
	margin-bottom: 6px;
	font-weight: 600;
	letter-spacing: 0.5px;
}

.inline-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.botbunch-controls-card input[type="number"],
.botbunch-controls-card input[type="text"],
.botbunch-controls-card select {
	width: 100%;
	padding: 10px 12px;
	background: var(--bb-surface-solid);
	border: 1px solid var(--bb-border);
	color: var(--bb-text);
	border-radius: 6px;
	font-size: 14px;
	transition: all 0.2s ease;
}

.botbunch-controls-card input[type="number"]:focus,
.botbunch-controls-card input[type="text"]:focus,
.botbunch-controls-card select:focus {
	border-color: var(--bb-primary);
	box-shadow: 0 0 8px rgba(255, 51, 102, 0.2);
	outline: none;
}

.checkbox-label {
	display: flex !important;
	align-items: center;
	gap: 8px;
	text-transform: none !important;
	font-size: 13px !important;
	cursor: pointer;
}

.checkbox-label input {
	margin: 0;
}

.pct-slider {
	-webkit-appearance: none;
	width: 100%;
	height: 6px;
	background: var(--bb-border);
	border-radius: 3px;
	outline: none;
}

.pct-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--bb-primary);
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Buttons grid */
.quality-presets, .crop-presets, .rotate-controls {
	display: flex;
	gap: 8px;
}

.q-preset-btn, .crop-btn, .rot-btn, .flip-btn {
	flex: 1;
	background: var(--bb-surface-solid);
	border: 1px solid var(--bb-border);
	color: var(--bb-text);
	padding: 8px 10px;
	border-radius: 6px;
	font-size: 11px;
	cursor: pointer;
	font-weight: 600;
	transition: all 0.2s ease;
}

.q-preset-btn:hover, .crop-btn:hover, .rot-btn:hover, .flip-btn:hover,
.q-preset-btn.active, .crop-btn.active {
	border-color: var(--bb-primary);
	background: rgba(255, 51, 102, 0.05);
	color: var(--bb-text);
}

.q-preset-btn.active, .crop-btn.active {
	background: var(--bb-primary-gradient);
	color: #fff;
	border: none;
	padding: 9px 11px;
}

/* Format selector block */
.botbunch-format-selector {
	padding: 18px 0;
	border-top: 1px solid var(--bb-border);
	border-bottom: 1px solid var(--bb-border);
	margin-bottom: 20px;
}

/* Action Trigger buttons */
.botbunch-main-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.full-btn {
	width: 100%;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 700;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.primary-btn {
	background: var(--bb-primary-gradient);
	color: #fff;
	box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

.primary-btn:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255, 51, 102, 0.45);
}

.primary-btn:disabled {
	background: #3a3f50;
	color: #727b93;
	cursor: not-allowed;
	box-shadow: none;
}

.success-btn {
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.success-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.secondary-btn {
	background: transparent;
	border: 1px solid var(--bb-border);
	color: var(--bb-text);
}

.secondary-btn:hover {
	background: rgba(255, 255, 255, 0.05);
}

.text-center {
	text-align: center;
}

/* Loading animations */
.botbunch-progress-bar-wrapper {
	margin-bottom: 20px;
}

.progress-bar-status {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: var(--bb-text-muted);
	margin-bottom: 6px;
	font-weight: 700;
}

.progress-track {
	width: 100%;
	height: 6px;
	background: var(--bb-border);
	border-radius: 3px;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	width: 0;
	background: var(--bb-primary-gradient);
	border-radius: 3px;
	transition: width 0.1s ease;
}

/* Keyframes */
@keyframes bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

/* SEO Footer Sections */
.botbunch-seo-footer {
	margin-top: 60px;
	padding-top: 20px;
}

.botbunch-seo-footer hr {
	border: none;
	border-top: 1px solid var(--bb-border);
	margin-bottom: 40px;
}

.seo-text-columns {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-bottom: 50px;
}

@media (max-width: 768px) {
	.seo-text-columns {
		grid-template-columns: 1fr;
	}
}

.seo-col h3 {
	font-family: var(--bb-font-title);
	font-size: 20px;
	margin: 0 0 20px 0;
}

.faq-card {
	background: var(--bb-surface);
	border: 1px solid var(--bb-border);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 15px;
}

.faq-card strong {
	color: var(--bb-primary);
	font-size: 14px;
	display: block;
	margin-bottom: 6px;
}

.faq-card p {
	margin: 0;
	font-size: 13px;
	color: var(--bb-text-muted);
}

.howto-steps-list {
	padding-left: 20px;
}

.howto-steps-list li {
	margin-bottom: 15px;
	font-size: 14px;
	color: var(--bb-text-muted);
}

/* Internal links footer grid */
.seo-internal-links-grid {
	background: rgba(0,0,0,0.15);
	border: 1px solid var(--bb-border);
	padding: 24px;
	border-radius: var(--bb-radius);
}

.seo-internal-links-grid h3 {
	font-family: var(--bb-font-title);
	font-size: 18px;
	margin: 0 0 20px 0;
	text-align: center;
}

.links-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}

.tool-link-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--bb-surface-solid);
	border: 1px solid var(--bb-border);
	border-radius: 8px;
	padding: 14px;
	color: var(--bb-text);
	text-decoration: none;
	transition: all 0.2s ease;
}

.tool-link-card:hover {
	transform: translateY(-2px);
	border-color: var(--bb-primary);
	box-shadow: 0 4px 12px rgba(255, 51, 102, 0.1);
}

.tool-link-card span {
	font-size: 18px;
}

.tool-link-card strong {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
