/* MTO Frontend Styles */

/* Shared */
.mto-configuration {
	margin-bottom: 2em;
}

.mto-price-display {
	font-size: 1.4em;
	font-weight: 600;
	margin-bottom: 1.5em;
	color: #333;
}

.mto-phase-title {
	font-size: 1.1em;
	font-weight: 600;
	margin-bottom: 1em;
	color: #333;
}

.mto-add-to-cart-wrapper {
	margin-top: 1.5em;
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Track Selection (Dropdown) */
.mto-track-group {
	margin-bottom: 1em;
}

.mto-track-select {
	width: 100%;
	max-width: 400px;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	background: #fff;
}

/* Package Selection (Checkboxes) - Dropdowns Mode */
.mto-packages-list {
	margin-bottom: 1em;
}

.mto-package-group {
	margin-bottom: 1.2em;
}

.mto-package-label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	color: #333;
}

/* Attribute Description */
p.mto-attribute-description {
	margin: 0 0 8px 0;
	font-size: 0.9em;
	color: #666;
	line-height: 1.4;
}

.mto-package-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mto-package-checkbox-label {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border: 2px solid #ddd;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 1em;
	transition: all 0.2s ease;
	color: #333;
	user-select: none;
}

.mto-package-checkbox-label:hover:not(.disabled) {
	border-color: #0073aa;
	color: #0073aa;
}

.mto-package-checkbox-label:has(input:checked) {
	border-color: #0073aa;
	background: #0073aa;
	color: #fff;
}

.mto-package-checkbox-label.disabled {
	opacity: 0.3;
	cursor: not-allowed;
	border-color: #eee;
	color: #ccc;
}

.mto-package-checkbox {
	width: 16px;
	height: 16px;
	cursor: pointer;
	accent-color: #fff;
}

.mto-package-checkbox-label.disabled .mto-package-checkbox {
	cursor: not-allowed;
}

/* Wizard Mode */
.mto-wizard-progress {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 1.5em;
}

.mto-progress-dot {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #e0e0e0;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85em;
	font-weight: 600;
	transition: all 0.2s ease;
}

.mto-progress-dot.current {
	background: #0073aa;
	color: #fff;
}

.mto-progress-dot.completed {
	background: #46b450;
	color: #fff;
}

.mto-wizard-step {
	display: none;
}

.mto-wizard-step.active {
	display: block;
}

.mto-step-title {
	font-size: 1.1em;
	margin-bottom: 1em;
	color: #333;
}

.mto-step-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 1em;
}

/* Track buttons in wizard */
.mto-option-button {
	padding: 12px 24px;
	border: 2px solid #ddd;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 1em;
	transition: all 0.2s ease;
	color: #333;
}

.mto-option-button:hover:not(.disabled) {
	border-color: #0073aa;
	color: #0073aa;
}

.mto-option-button.selected {
	border-color: #0073aa;
	background: #0073aa;
	color: #fff;
}

.mto-option-button.disabled {
	opacity: 0.3;
	cursor: not-allowed;
	border-color: #eee;
	color: #ccc;
}

/* Package checkboxes in wizard */
.mto-package-step-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.mto-option-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 18px;
	border: 2px solid #ddd;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 1em;
	transition: all 0.2s ease;
	color: #333;
	user-select: none;
}

.mto-option-checkbox:hover:not(.disabled) {
	border-color: #0073aa;
	color: #0073aa;
}

.mto-option-checkbox:has(input:checked) {
	border-color: #0073aa;
	background: #0073aa;
	color: #fff;
}

.mto-option-checkbox.disabled {
	opacity: 0.3;
	cursor: not-allowed;
	border-color: #eee;
	color: #ccc;
}

/* Wizard Navigation */
.mto-wizard-nav {
	display: flex;
	gap: 12px;
	margin-top: 1em;
}

.mto-wizard-prev,
.mto-wizard-next {
	padding: 10px 24px;
}

.mto-wizard-next:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Combination Alert */
.mto-combination-alert {
	display: block;
	margin-top: 1em;
	padding: 10px 14px;
	font-size: 0.95em;
	line-height: 1.5;
}

.mto-combination-alert .mto-reset-packages {
	margin-left: 4px;
	text-decoration: underline;
	cursor: pointer;
}

/* Responsive */
@media (max-width: 600px) {
	.mto-step-options,
	.mto-package-options,
	.mto-package-step-options {
		flex-direction: column;
	}

	.mto-option-button,
	.mto-package-checkbox-label,
	.mto-option-checkbox {
		width: 100%;
		text-align: center;
		justify-content: center;
	}

	.mto-track-select {
		max-width: 100%;
	}
}
