/**
 * Frontend Styles
 *
 * @package PracticalLayers
 */

/* Import Quantico font */
@import url('https://fonts.googleapis.com/css2?family=Quantico:wght@400;700&display=swap');

/* Apply Quantico font to all elements */
.pl-3dprint-container,
.pl-3dprint-container * {
	font-family: 'Quantico', sans-serif !important;
}

/* Hide email, comment and request quote fields */
#add-cart-wrapper .price-request-field[name="p3dlite_email_address"],
#add-cart-wrapper .price-request-field[name="p3dlite_request_comment"],
#add-cart-wrapper button[type="submit"] {
	display: none !important;
}

/* Hide printer selection completely */
.p3dlite-info fieldset#printer_fieldset,
.p3dlite-info fieldset#printer_fieldset * {
	display: none !important;
}

/* Hide duplicate estimated price above quantity (but keep element for 3dprint-lite to update) */
.p3dlite-details #price-wrapper {
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
	position: absolute !important;
	left: -9999px !important;
}

/* Product name input */
.pl-product-name-wrapper {
	margin-top: 20px;
	margin-bottom: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 5px;
	border: 1px solid #e0e0e0;
}

.pl-product-name-wrapper label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
	color: #333;
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: 0.5px;
}

.pl-product-name-input {
	width: 100%;
	padding: 12px;
	border: 2px solid #e0e0e0;
	border-radius: 5px;
	font-size: 16px;
	font-family: 'Quantico', sans-serif;
	transition: border-color 0.3s ease;
}

.pl-product-name-input:focus {
	outline: none;
	border-color: #8c00ff;
}

/* Style for price and add to cart wrapper */
.pl-add-to-cart-wrapper {
	margin-top: 20px;
	margin-bottom: 20px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 5px;
	border: 1px solid #e0e0e0;
}

.pl-price-display {
	margin-bottom: 20px;
	font-size: 18px;
	font-weight: 700;
}

.pl-price-label {
	color: #666;
	margin-right: 10px;
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: 0.5px;
}

.pl-price-amount {
	color: #8c00ff;
	font-size: 28px;
	font-weight: 700;
}

.pl-add-to-cart-frontend {
	margin-right: 10px;
	padding: 15px 30px;
	font-size: 16px;
	font-weight: 700;
	font-family: 'Quantico', sans-serif;
	background: #8c00ff;
	color: #fff;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: background 0.3s ease;
	text-transform: uppercase;
	letter-spacing: 1px;
	width: 100%;
}

.pl-add-to-cart-frontend:hover {
	background: #7a00e6;
}

.pl-add-to-cart-frontend:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.pl-cart-message {
	display: block;
	margin-top: 15px;
	font-weight: 600;
	line-height: 1.6;
}

.pl-cart-message a.button {
	margin-left: 5px;
	margin-right: 5px;
	text-decoration: none;
	display: inline-block;
	padding: 8px 16px;
	background: #8c00ff;
	color: #fff;
	border-radius: 5px;
	font-family: 'Quantico', sans-serif;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.pl-cart-message a.button:hover {
	background: #7a00e6;
}

.pl-cart-message span {
	display: block;
	margin-bottom: 10px;
}

#pl-add-to-cart-wrapper {
	clear: both;
}

/* Smooth transitions */
.pl-add-to-cart-wrapper {
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.pl-add-to-cart-wrapper[style*="display: none"] {
	opacity: 0;
	transform: translateY(-10px);
}

/* Material list improvements */
.p3dlite-info fieldset#material_fieldset {
	margin-bottom: 20px;
}

.p3dlite-info fieldset#material_fieldset legend {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 10px;
	padding: 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-family: 'Quantico', sans-serif;
}

/* Infill fieldset styling (same as material) */
.p3dlite-info fieldset#infill_fieldset {
	margin-bottom: 20px;
}

.p3dlite-info fieldset#infill_fieldset legend {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 10px;
	padding: 0 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-family: 'Quantico', sans-serif;
}

.p3dlite-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.p3dlite-list li {
	padding: 10px 15px;
	border: 2px solid #e0e0e0;
	border-radius: 5px;
	cursor: pointer;
	transition: all 0.3s ease;
	background: #fff;
}

.p3dlite-list li:hover {
	border-color: #8c00ff;
	transform: translateY(-2px);
	box-shadow: 0 2px 8px rgba(140, 0, 255, 0.2);
}

.p3dlite-list li input:checked + .color-sample {
	border: 3px solid #8c00ff;
}

/* Quantity input styling */
.p3dlite-info .pl-quantity-wrapper {
	margin-top: 20px;
	margin-bottom: 20px;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 5px;
	border: 1px solid #e0e0e0;
}

.p3dlite-info .pl-quantity-wrapper label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
	color: #333;
	text-transform: uppercase;
	font-size: 14px;
	letter-spacing: 0.5px;
	font-family: 'Quantico', sans-serif;
}

.p3dlite-info .pl-quantity-wrapper input[type="number"],
.p3dlite-info input[name="p3dlite_quantity"] {
	width: 100%;
	padding: 12px;
	border: 2px solid #e0e0e0;
	border-radius: 5px;
	font-size: 16px;
	font-family: 'Quantico', sans-serif;
	transition: border-color 0.3s ease;
}

.p3dlite-info .pl-quantity-wrapper input[type="number"]:focus,
.p3dlite-info input[name="p3dlite_quantity"]:focus {
	outline: none;
	border-color: #8c00ff;
}

/* Hide original quantity field if it exists elsewhere */
.p3dlite-details input[name="p3dlite_quantity"]:not(.pl-quantity-wrapper input) {
	display: none !important;
}

/* Fix color-sample to be round instead of oval */
.color-sample {
	display: inline-block !important;
	width: 24px !important;
	height: 24px !important;
	border-radius: 50% !important;
	margin-right: 8px;
	vertical-align: middle;
	border: 2px solid #ddd;
	flex-shrink: 0;
}

/* Hide duplicate dropdowns/selects if list view is used */
.p3dlite-info.stellarnav,
.p3dlite-info.applePie,
.p3dlite-info nav.stellarnav,
.p3dlite-info nav.applePie {
	display: none !important;
}

/* Hide dropdowns when list is visible */
#material_fieldset ~ .stellarnav,
#material_fieldset ~ .applePie {
	display: none !important;
}
