/**
 * SmartKits Configurator Styles
 *
 * @package SmartKits_Configurator
 */

/* Main Container */
.smartkits-configurator {
	max-width: 1200px;
	margin: 40px auto;
	padding: 30px;
	background: #fff;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Step Navigation Wrapper */
.smartkits-steps-nav-wrapper {
	position: relative;
	margin-bottom: 30px;
}

.smartkits-steps-nav {
	display: flex;
	justify-content: flex-start;
	align-items: center;
	padding-bottom: 15px;
	border-bottom: 1px solid #e0e0e0;
	gap: 20px;
	overflow: hidden;
}

/* Nav arrows - hidden on desktop by default */
.smartkits-nav-arrow {
	display: none;
	position: absolute;
	top: 0;
	bottom: 15px;
	width: 32px;
	border: none;
	background: linear-gradient(to right, rgba(255,255,255,0.95) 60%, rgba(255,255,255,0));
	color: #1e3a8a;
	font-size: 24px;
	font-weight: 700;
	cursor: pointer;
	z-index: 2;
	align-items: center;
	justify-content: center;
	padding: 0;
	line-height: 1;
}

.smartkits-nav-arrow-left {
	left: 0;
	background: linear-gradient(to right, rgba(255,255,255,0.95) 60%, rgba(255,255,255,0));
}

.smartkits-nav-arrow-right {
	right: 0;
	background: linear-gradient(to left, rgba(255,255,255,0.95) 60%, rgba(255,255,255,0));
}

.smartkits-nav-arrow:hover {
	color: #1e40af;
}

.smartkits-step-item {
	text-align: center;
	padding: 10px 0;
	color: #999;
	font-size: 14px;
	font-weight: 500;
	cursor: default;
	transition: all 0.3s ease;
	position: relative;
	white-space: nowrap;
	text-decoration: none;
	flex-shrink: 0;
}

.smartkits-step-item.active {
	color: #1e3a8a;
	font-weight: 600;
}

.smartkits-step-item.active::after {
	content: '';
	position: absolute;
	bottom: -15px;
	left: 0;
	right: 0;
	height: 2px;
	background: #1e3a8a;
}

/* Step Content */
.smartkits-configurator-content {
	position: relative;
	min-height: 400px;
}

.smartkits-step {
	display: none !important;
	width: 100%;
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.smartkits-step.active {
	display: block !important;
	opacity: 1;
	animation: fadeIn 0.3s ease-in;
}

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

.smartkits-step-title {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 25px;
	color: #1a1a1a;
}

/* Fields */
.smartkits-field-group {
	margin-bottom: 0;
}

.smartkits-field-label {
	display: block;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 10px;
	color: #333;
}

.smartkits-select {
	width: 100%;
	max-width: 400px;
	padding: 10px 40px 10px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	font-size: 16px;
	background: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	appearance: none;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.smartkits-select:focus {
	outline: none;
	border-color: #1e3a8a;
}

/* Numeric Input Fields */
.smartkits-input-number {
	width: 100%;
	max-width: 400px;
	padding: 10px 50px 10px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	font-size: 16px;
	background: #fff;
	appearance: none;
	transition: border-color 0.3s ease;
	position: relative;
}

.smartkits-input-number:focus {
	outline: none;
	border-color: #1e3a8a;
	box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.smartkits-input-number:invalid {
	border-color: #dc2626;
}

.smartkits-field-group {
	position: relative;
}

.smartkits-input-suffix {
	position: absolute;
	left: calc(400px - 35px);
	top: 50%;
	transform: translateY(-50%);
	color: #666;
	font-size: 16px;
	pointer-events: none;
	font-weight: 500;
}

@media (max-width: 768px) {
	.smartkits-input-suffix {
		left: calc(100% - 35px);
	}
}

.smartkits-field-description {
	margin-top: 8px;
	font-size: 14px;
	color: #666;
	font-style: italic;
}

/* Dimensions Fields */
.smartkits-dimensions-fields {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-top: 0;
	margin-bottom: 20px;
}

/* Structure Fields */
.smartkits-structure-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 30px;
	margin-top: 20px;
	align-items: start;
}

.smartkits-structure-fields .smartkits-field-group {
	display: flex;
	flex-direction: column;
}

.smartkits-structure-fields .smartkits-field-description {
	font-size: 14px;
	color: #666;
	font-style: normal;
	line-height: 1.5;
	margin-top: 0;
}

/* Colour Swatches */
.smartkits-colours-fields {
	display: grid;
	gap: 30px;
	margin-top: 20px;
}

.smartkits-colour-group {
	margin-bottom: 10px;
}

.smartkits-colour-label {
	display: block;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 12px;
	color: #1e3a8a;
}

.smartkits-colour-swatches {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.smartkits-colour-swatch-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

.smartkits-colour-swatch {
	width: 56px;
	height: 56px;
	border: 2px solid #d5d5d5;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	position: relative;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.smartkits-colour-swatch:hover {
	border-color: #1e3a8a;
	box-shadow: 0 2px 8px rgba(30, 58, 138, 0.25);
}

.smartkits-colour-swatch.active {
	border-color: #1e3a8a;
	border-width: 3px;
	box-shadow: 0 0 0 2px rgba(30, 58, 138, 0.2);
}

.smartkits-colour-info-icon {
	display: none;
}

/* Tooltip - shown on hover with colour name */
.smartkits-colour-tooltip {
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: 6px;
	padding: 5px 10px;
	background: #333;
	color: white;
	border-radius: 4px;
	font-size: 12px;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 1000;
}

.smartkits-colour-swatch-wrapper:hover .smartkits-colour-tooltip {
	opacity: 1;
}

.smartkits-colour-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 4px solid transparent;
	border-top-color: #333;
}

/* Colour name hidden by default, shown on hover via tooltip */
.smartkits-colour-label-text {
	display: none;
}

/* Upgrades */
.smartkits-upgrades-fields {
	margin-top: 20px;
}

.smartkits-upgrades-filter {
	margin-bottom: 25px;
}

.smartkits-upgrades-filter .smartkits-select {
	max-width: 300px;
}

/* Upgrades Slider */
.smartkits-upgrades-slider-wrapper {
	position: relative;
	margin-top: 20px;
}

.smartkits-upgrades-grid {
	display: flex;
	gap: 20px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 2px 12px;
}

.smartkits-upgrades-grid::-webkit-scrollbar {
	display: none;
}

.smartkits-upgrades-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: 1px solid #d0d0d0;
	border-radius: 50%;
	background: #fff;
	color: #1e3a8a;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
	transition: all 0.2s ease;
	padding: 0;
	line-height: 1;
}

.smartkits-upgrades-arrow:hover {
	background: #1e3a8a;
	color: #fff;
	border-color: #1e3a8a;
}

.smartkits-upgrades-arrow-left {
	left: -18px;
}

.smartkits-upgrades-arrow-right {
	right: -18px;
}

.smartkits-upgrade-item {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	min-width: 220px;
	max-width: 260px;
	flex-shrink: 0;
}

.smartkits-upgrade-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	border-color: #1e3a8a;
}

/* When no image: center content vertically */
.smartkits-upgrade-item:not(:has(.smartkits-upgrade-image img:not([style*="display:none"]))) {
	justify-content: center;
}

.smartkits-upgrade-name {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 12px;
	color: #333;
	order: 1;
}

.smartkits-upgrade-image {
	margin-bottom: 12px;
	order: 2;
}

.smartkits-upgrade-image img {
	max-width: 100%;
	height: auto;
	max-height: 140px;
	object-fit: contain;
	border-radius: 4px;
}

.smartkits-upgrade-price {
	font-size: 18px;
	font-weight: 600;
	color: #333;
	margin-bottom: 12px;
	order: 3;
}

.smartkits-upgrade-quantity {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	order: 4;
	margin-top: auto;
}

.smartkits-upgrade-quantity label {
	font-size: 14px;
	color: #666;
	font-weight: 600;
}

.smartkits-quantity-input {
	width: 70px;
	padding: 8px;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	text-align: center;
	font-size: 16px;
}

/* Payment Options */
.smartkits-payment-fields {
	margin-bottom: 30px;
	margin-top: 20px;
}

.smartkits-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	cursor: pointer;
}

.smartkits-checkbox {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

/* Price Display */
.smartkits-price-display {
	text-align: left;
	padding: 25px 0;
	margin: 30px 0;
	border-top: 1px solid #e0e0e0;
}

.smartkits-price-label {
	font-size: 18px;
	color: #1e3a8a;
	margin-right: 10px;
	font-weight: 700;
}

.smartkits-price-value {
	font-size: 28px;
	font-weight: 700;
	color: #1e3a8a;
	display: inline-block;
}

/* Price Breakdown */
.smartkits-price-breakdown {
	margin-top: 10px;
	font-size: 0.9em;
	color: #555;
}

.smartkits-price-breakdown summary {
	cursor: pointer;
	padding: 5px 0;
	font-weight: 500;
	color: #555;
	user-select: none;
}

.smartkits-breakdown-details {
	margin-top: 10px;
	padding-left: 15px;
}

.smartkits-breakdown-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 0;
	font-size: 14px;
	color: #444;
}

.smartkits-breakdown-item .breakdown-label {
	font-weight: 500;
}

.smartkits-breakdown-item .breakdown-value {
	font-weight: 600;
	color: #1e3a8a;
}

.smartkits-breakdown-total {
	margin-top: 8px;
	padding-top: 10px;
	border-top: 1px solid #ddd;
	font-weight: 700;
	font-size: 15px;
}

.smartkits-breakdown-total .breakdown-label,
.smartkits-breakdown-total .breakdown-value {
	font-weight: 700;
	color: #1e3a8a;
}

/* Navigation Buttons */
.smartkits-navigation {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin-top: 40px;
}

.smartkits-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 30px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
}

.smartkits-btn-prev,
.smartkits-btn-next {
	background: #1e3a8a;
	color: #fff;
	flex: 1;
	border-radius: 6px;
	font-weight: 600;
}

.smartkits-btn-prev:hover,
.smartkits-btn-next:hover {
	background: #1e40af;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.smartkits-btn-arrow {
	font-size: 20px;
}

/* Action Buttons */
.smartkits-action-buttons {
	display: flex;
	gap: 20px;
	margin-top: 40px;
}

.smartkits-btn-cart {
	background: #fff;
	color: #1e3a8a;
	border: 2px solid #1e3a8a;
	flex: 1;
	border-radius: 4px;
}

.smartkits-btn-cart:hover {
	background: #f8f9fa;
}

.smartkits-btn-buy-now {
	background: #1e3a8a;
	color: #fff;
	flex: 1;
	border-radius: 4px;
}

.smartkits-btn-buy-now:hover {
	background: #1e40af;
}

.smartkits-btn-icon {
	font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
	.smartkits-steps-nav-wrapper {
		position: relative;
	}

	.smartkits-steps-nav {
		overflow-x: auto;
		overflow-y: hidden;
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		gap: 16px;
		padding-left: 4px;
		padding-right: 4px;
		flex-wrap: nowrap;
	}

	.smartkits-steps-nav::-webkit-scrollbar {
		display: none;
	}

	.smartkits-nav-arrow {
		display: flex;
	}

	.smartkits-nav-arrow-left {
		padding-right: 4px;
	}

	.smartkits-nav-arrow-right {
		padding-left: 4px;
	}

	.smartkits-step-item {
		font-size: 13px;
		padding: 10px 2px;
	}

	.smartkits-dimensions-fields,
	.smartkits-structure-fields {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.smartkits-structure-fields .smartkits-field-description {
		margin-top: 10px;
	}

	.smartkits-upgrade-item {
		min-width: 180px;
		max-width: 220px;
	}

	.smartkits-upgrades-arrow {
		display: none;
	}

	.smartkits-navigation {
		flex-direction: column;
	}

	.smartkits-action-buttons {
		flex-direction: column;
	}

	.smartkits-price-value {
		font-size: 28px;
	}

	.smartkits-price-display {
		text-align: center;
	}

	.smartkits-colour-swatch {
		width: 48px;
		height: 48px;
	}

	.smartkits-colour-swatches {
		gap: 6px;
	}
}

