/*
Theme Name: Print3D Pro
Author: WordPress Telex
Description: A dark, industrial WordPress block theme for 3D printing budget management. Features deep navy layered backgrounds, electric lime accents, monospace typography, and scanline textures evoking additive manufacturing precision.
Version: 0.1.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: print3d-pro
Tags: block-theme, full-site-editing, dark-mode

Print3D Pro — Layer Stack Design System
*/

/* === Layer Stack Core === */

.equal-cards > .wp-block-column {
	display: flex;
	flex-direction: column;
	flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.equal-cards .cta-bottom {
	margin-top: auto;
	justify-content: center;
}

.wp-site-blocks > footer {
	margin-block-start: 0;
}

/* === Scanline Overlay === */
.scanline-overlay::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: repeating-linear-gradient(
		0deg,
		transparent,
		transparent 3px,
		rgba(255, 255, 255, 0.012) 3px,
		rgba(255, 255, 255, 0.012) 4px
	);
	z-index: 1;
}

/* === Glow Line Separator === */
.glow-line-top {
	position: relative;
}

.glow-line-top::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, rgba(168, 255, 62, 0.2) 30%, rgba(168, 255, 62, 0.4) 50%, rgba(168, 255, 62, 0.2) 70%, transparent 100%);
	box-shadow: 0 0 12px rgba(168, 255, 62, 0.3);
	z-index: 2;
}

.glow-line-bottom {
	position: relative;
}

.glow-line-bottom::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, rgba(168, 255, 62, 0.15) 30%, rgba(168, 255, 62, 0.3) 50%, rgba(168, 255, 62, 0.15) 70%, transparent 100%);
	box-shadow: 0 0 8px rgba(168, 255, 62, 0.2);
	z-index: 2;
}

/* === Nav Link Underline Effect === */
.layer-stack-nav a {
	position: relative;
	transition: color 0.25s ease;
}

.layer-stack-nav a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 0;
	height: 2px;
	background: #A8FF3E;
	box-shadow: 0 0 8px rgba(168, 255, 62, 0.4);
	transition: width 0.3s ease;
}

.layer-stack-nav a:hover::after {
	width: 100%;
}

/* === CTA Glow Effect === */
.cta-glow:hover {
	box-shadow: 0 0 30px rgba(168, 255, 62, 0.4), 0 4px 20px rgba(168, 255, 62, 0.2) !important;
	transform: translateY(-1px);
}

.cta-outline:hover {
	border-color: #A8FF3E !important;
	color: #F1F5F9 !important;
}

/* === Card Hover Effects === */
.layer-card {
	position: relative;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.layer-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 32px rgba(168, 255, 62, 0.08), 0 0 0 1px rgba(168, 255, 62, 0.15);
}

/* === Stat Value Glow === */
.stat-glow {
	text-shadow: 0 0 20px rgba(168, 255, 62, 0.3);
}

/* === Grid Pattern Decoration === */
.grid-pattern-right::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 200px;
	height: 200px;
	opacity: 0.03;
	background:
		linear-gradient(#A8FF3E 1px, transparent 1px),
		linear-gradient(90deg, #A8FF3E 1px, transparent 1px);
	background-size: 24px 24px;
	pointer-events: none;
	z-index: 0;
}

.grid-pattern-left::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 160px;
	height: 160px;
	opacity: 0.025;
	background:
		linear-gradient(#A8FF3E 1px, transparent 1px),
		linear-gradient(90deg, #A8FF3E 1px, transparent 1px);
	background-size: 20px 20px;
	pointer-events: none;
	z-index: 0;
}

/* === Image Frame Effect === */
.image-frame-glow {
	position: relative;
}

.image-frame-glow::before {
	content: '';
	position: absolute;
	top: -4px;
	left: -4px;
	right: -4px;
	bottom: -4px;
	border: 1px solid rgba(168, 255, 62, 0.12);
	z-index: 0;
	pointer-events: none;
}

.image-frame-glow::after {
	content: '';
	position: absolute;
	top: -12px;
	left: -12px;
	right: -12px;
	bottom: -12px;
	border: 1px solid rgba(168, 255, 62, 0.04);
	z-index: 0;
	pointer-events: none;
}

/* === Mono Label Styling === */
.mono-label {
	font-family: 'Azeret Mono', monospace;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.25em;
	text-transform: uppercase;
}

/* === Process Step Number === */
.step-number {
	font-family: 'Azeret Mono', monospace;
	font-size: 2rem;
	font-weight: 700;
	color: #A8FF3E;
	text-shadow: 0 0 30px rgba(168, 255, 62, 0.25);
	line-height: 1;
}

/* === Horizontal Scroll Bar for Stats === */
.stats-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 3rem;
	flex-wrap: wrap;
}

.stats-bar .wp-block-group {
	text-align: center;
}

/* === Material Tag Pill === */
.material-tag {
	display: inline-block;
	padding: 4px 12px;
	border: 1px solid rgba(168, 255, 62, 0.2);
	font-family: 'Azeret Mono', monospace;
	font-size: 0.6rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #A8FF3E;
}

/* === Sticky Header Backdrop === */
.layer-stack-header {
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

/* === Footer Divider === */
.footer-glow-top {
	border-top: 1px solid rgba(168, 255, 62, 0.08);
}

/* === Pricing Table === */
.pricing-tier {
	position: relative;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-tier:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 40px rgba(168, 255, 62, 0.1), 0 0 0 1px rgba(168, 255, 62, 0.2);
}

.pricing-tier-featured {
	box-shadow: 0 0 0 2px #A8FF3E, 0 0 40px rgba(168, 255, 62, 0.12);
}

.pricing-tier-featured:hover {
	box-shadow: 0 0 0 2px #A8FF3E, 0 12px 40px rgba(168, 255, 62, 0.2);
}

/* === Order Row === */
.order-row {
	position: relative;
	transition: background-color 0.2s ease;
}

.order-row:hover {
	background-color: rgba(168, 255, 62, 0.03) !important;
}

/* === Order Card Enhancements === */
.order-card-pendente {
	border-left-color: #FBBF24;
}

.order-card-producao {
	border-left-color: #A8FF3E;
}

.order-card-concluido {
	border-left-color: #94A3B8;
}

/* === Status Badges === */
.status-badge {
	display: inline-block;
	padding: 3px 10px;
	font-family: 'Azeret Mono', monospace;
	font-size: 0.55rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.status-active {
	background: rgba(168, 255, 62, 0.15);
	color: #A8FF3E;
	border: 1px solid rgba(168, 255, 62, 0.3);
}

.status-pending {
	background: rgba(251, 191, 36, 0.12);
	color: #FBBF24;
	border: 1px solid rgba(251, 191, 36, 0.25);
}

.status-complete {
	background: rgba(148, 163, 184, 0.1);
	color: #94A3B8;
	border: 1px solid rgba(148, 163, 184, 0.2);
}

/* === Progress Bar === */
.progress-track {
	width: 100%;
	height: 4px;
	background: rgba(148, 163, 184, 0.1);
	position: relative;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #A8FF3E, rgba(168, 255, 62, 0.6));
	box-shadow: 0 0 8px rgba(168, 255, 62, 0.4);
}

/* === Dashboard Metric Card === */
.metric-card {
	position: relative;
	transition: transform 0.25s ease;
}

.metric-card:hover {
	transform: translateY(-2px);
}

.metric-card::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, #A8FF3E, transparent);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.metric-card:hover::after {
	opacity: 1;
}

/* === Quote Form Styling === */
.quote-field-group {
	position: relative;
}

.quote-field-group::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: rgba(168, 255, 62, 0.15);
}

/* === Quote Notes Textarea === */
#quote-notes-input:focus {
	border-color: rgba(168, 255, 62, 0.3);
	box-shadow: 0 0 0 2px rgba(168, 255, 62, 0.06);
}

#quote-notes-input::placeholder {
	color: rgba(148, 163, 184, 0.4);
	font-weight: 400;
}

/* === Quote Progress Bar Animation === */
#quote-progress-bar div {
	transition: background 0.4s ease;
}

/* === Pulse Dot === */
.pulse-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #A8FF3E;
	box-shadow: 0 0 8px rgba(168, 255, 62, 0.6);
	animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
	0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(168, 255, 62, 0.6); }
	50% { opacity: 0.5; box-shadow: 0 0 4px rgba(168, 255, 62, 0.3); }
}

/* === Data Table Header === */
.table-header {
	border-bottom: 1px solid rgba(168, 255, 62, 0.15) !important;
}

/* === Ticker Tape === */
.ticker-tape {
	overflow: hidden;
	position: relative;
}

.ticker-tape::before,
.ticker-tape::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 60px;
	z-index: 2;
	pointer-events: none;
}

.ticker-tape::before {
	left: 0;
	background: linear-gradient(90deg, #0A1628, transparent);
}

.ticker-tape::after {
	right: 0;
	background: linear-gradient(270deg, #0A1628, transparent);
}

/* === Login Panel === */
.login-panel {
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(168, 255, 62, 0.05);
}

.login-icon-box {
	width: 60px;
	height: 60px;
	box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

/* === Dashboard Layout === */
.dashboard-layout {
	min-height: 100vh;
}

.sidebar-nav-item {
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.sidebar-nav-item:hover {
	background-color: rgba(148, 163, 184, 0.06);
}

.sidebar-nav-active {
	background: #3B82F6 !important;
}

.sidebar-nav-active p {
	color: #F1F5F9 !important;
}

.sidebar-nav-exit:hover {
	background-color: rgba(239, 68, 68, 0.08);
}

/* === Dashboard Cards === */
.dashboard-card {
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-card:hover {
	transform: translateY(-2px);
}

.dashboard-card-accent {
	background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.dashboard-card-action {
	background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
	cursor: pointer;
}

.dashboard-card-action:hover {
	background: linear-gradient(135deg, #4F93F7 0%, #3B82F6 100%);
	box-shadow: 0 8px 32px rgba(59, 130, 246, 0.25);
}

/* === Dashboard Top Bar === */
.dashboard-topbar {
	position: sticky;
	top: 0;
	background: #0A1628;
	z-index: 40;
}

/* === Points Progress Bar === */
.points-progress-bar {
	height: 6px;
	overflow: hidden;
}

.points-progress-bar .wp-block-group {
	height: 6px;
}

/* === Panel Visibility (controlled by JS) === */
.client-panel,
.admin-panel {
	width: 100%;
}

/* === Dashboard Layout Fix === */
.dashboard-layout {
	min-height: 100vh;
	flex-wrap: nowrap !important;
}

.dashboard-layout > .wp-block-column:first-child {
	flex-shrink: 0;
	min-width: 220px;
	max-width: 220px;
}

.dashboard-layout > .wp-block-column:last-child {
	flex-grow: 1;
	min-width: 0;
	overflow-y: auto;
	max-height: 100vh;
}

/* === Selected Option Indicator === */
.selected-option {
	background-color: rgba(168, 255, 62, 0.15) !important;
}

/* === Color Swatch Hover === */
.color-swatch {
	cursor: pointer;
	transition: border-color 0.2s ease, transform 0.15s ease;
}

.color-swatch:hover {
	transform: scale(1.15);
}

/* === STL Viewer === */
.stl-upload-zone {
	border: 2px dashed rgba(168, 255, 62, 0.2);
	border-radius: 8px;
	padding: 32px 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.3s ease, background-color 0.3s ease;
	position: relative;
	background: rgba(148, 163, 184, 0.02);
}

.stl-upload-zone:hover,
.stl-upload-zone.drag-over {
	border-color: rgba(168, 255, 62, 0.5);
	background: rgba(168, 255, 62, 0.04);
}

.stl-upload-zone input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
	height: 100%;
}

.stl-upload-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: rgba(168, 255, 62, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
}

.stl-upload-icon svg {
	width: 24px;
	height: 24px;
	stroke: #A8FF3E;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.stl-preview-container {
	border: 1px solid rgba(168, 255, 62, 0.12);
	border-radius: 8px;
	overflow: hidden;
	background: #0A1628;
	position: relative;
}

.stl-preview-canvas {
	width: 100%;
	height: 320px;
	display: block;
	background: linear-gradient(135deg, #0A1628 0%, #0D1B2A 100%);
}

.stl-preview-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-top: 1px solid rgba(168, 255, 62, 0.08);
	background: rgba(13, 27, 42, 0.8);
}

.stl-preview-info p {
	font-family: 'Azeret Mono', monospace;
	font-size: 0.6rem;
	margin: 0;
}

.stl-preview-controls {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	gap: 6px;
	z-index: 5;
}

.stl-preview-controls button {
	width: 30px;
	height: 30px;
	border-radius: 4px;
	border: 1px solid rgba(168, 255, 62, 0.15);
	background: rgba(10, 22, 40, 0.85);
	backdrop-filter: blur(6px);
	color: #A8FF3E;
	font-size: 0.65rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease;
	padding: 0;
	font-family: 'Azeret Mono', monospace;
}

.stl-preview-controls button:hover {
	background: rgba(168, 255, 62, 0.1);
	border-color: rgba(168, 255, 62, 0.3);
}

.stl-remove-btn {
	font-family: 'Azeret Mono', monospace;
	font-size: 0.6rem;
	font-weight: 600;
	color: #EF4444;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 8px;
	transition: color 0.2s ease;
}

.stl-remove-btn:hover {
	color: #F87171;
}

.stl-grid-floor {
	opacity: 0.15;
}

.stl-loading-spinner {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 22, 40, 0.9);
	z-index: 10;
}

.stl-loading-spinner::after {
	content: '';
	width: 32px;
	height: 32px;
	border: 3px solid rgba(168, 255, 62, 0.15);
	border-top-color: #A8FF3E;
	border-radius: 50%;
	animation: stl-spin 0.8s linear infinite;
}

@keyframes stl-spin {
	to { transform: rotate(360deg); }
}

/* === Admin Printer Card === */
.printer-card-active {
	border-left: 3px solid #A8FF3E;
}

.printer-card-available {
	border-left: 3px solid #3B82F6;
}

.printer-card-maintenance {
	border-left: 3px solid #FBBF24;
}

/* === Printer Progress Animation === */
@keyframes printerPulse {
	0%, 100% { box-shadow: 0 0 8px rgba(168, 255, 62, 0.3); }
	50% { box-shadow: 0 0 16px rgba(168, 255, 62, 0.5); }
}

@keyframes printerErrorPulse {
	0%, 100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
	50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.5); }
}

/* === Settings Row Hover === */
.settings-row:hover {
	background-color: rgba(148, 163, 184, 0.03);
}

/* === Weight Input Styling === */
#piece-weight-input:focus {
	border-color: rgba(168, 255, 62, 0.4);
	box-shadow: 0 0 0 2px rgba(168, 255, 62, 0.08);
}

#piece-weight-input::placeholder {
	color: rgba(148, 163, 184, 0.4);
	font-weight: 400;
}

#piece-weight-input::-webkit-outer-spin-button,
#piece-weight-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

#piece-weight-input[type=number] {
	-moz-appearance: textfield;
}

/* === STL Dimensions Panel === */
#stl-dimensions-panel {
	transition: opacity 0.3s ease;
}

#stl-scale-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #A8FF3E;
	cursor: pointer;
	box-shadow: 0 0 8px rgba(168, 255, 62, 0.4);
}

#stl-scale-slider::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #A8FF3E;
	cursor: pointer;
	border: none;
	box-shadow: 0 0 8px rgba(168, 255, 62, 0.4);
}

#stl-scale-input:focus {
	border-color: rgba(168, 255, 62, 0.4);
	box-shadow: 0 0 0 2px rgba(168, 255, 62, 0.08);
}

#stl-scale-input::-webkit-outer-spin-button,
#stl-scale-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

#stl-scale-input[type=number] {
	-moz-appearance: textfield;
}

.stl-unit-btn {
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.stl-unit-btn:hover {
	border-color: rgba(168, 255, 62, 0.2);
}

/* === Order Detail Modal === */
.order-detail-modal-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

/* === Material Form Modal Select === */
.wp-block-group select {
	color: #F1F5F9;
	background: rgba(148, 163, 184, 0.04);
}

.wp-block-group select option {
	background: #1B2E4A;
	color: #F1F5F9;
}

/* === Finish Option Styling === */
.finish-option {
	transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.finish-option:hover {
	transform: translateY(-2px);
	background-color: rgba(148, 163, 184, 0.03);
}

.finish-option.selected-option {
	background-color: rgba(168, 255, 62, 0.04) !important;
}

/* === Admin Login Shake Animation === */
@keyframes adminShake {
	0%, 100% { transform: translateX(0); }
	15% { transform: translateX(-8px); }
	30% { transform: translateX(7px); }
	45% { transform: translateX(-6px); }
	60% { transform: translateX(4px); }
	75% { transform: translateX(-2px); }
}

/* === Loyalty Level Bar Animations === */
#loyalty-bar-fill {
	transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

#loyalty-bar-thumb {
	transition: background 0.4s ease, box-shadow 0.4s ease;
}

#loyalty-level-section {
	animation: loyaltyFadeIn 0.5s ease;
}

@keyframes loyaltyFadeIn {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

#loyalty-label-bronze,
#loyalty-label-silver,
#loyalty-label-gold {
	transition: background 0.3s ease, border-color 0.3s ease;
}

/* === Responsive Adjustments === */
@media (max-width: 782px) {
	.stats-bar {
		gap: 1.5rem;
	}

	.layer-stack-nav {
		display: none;
	}

	.dashboard-layout {
		flex-direction: column !important;
	}

	.dashboard-layout > .wp-block-column:first-child {
		max-width: 100%;
		min-width: 100%;
	}

	.dashboard-layout > .wp-block-column:last-child {
		max-height: none;
	}
}