/* ==========================================================================
   PimpMyDeck Wizard – Stylesheet
   ========================================================================== */

/* Container */
.pmd-wizard {
	max-width: 900px;
	margin: 0 auto 80px;
	font-family: inherit;
	box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Tab navigation
   -------------------------------------------------------------------------- */

.pmd-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin-bottom: 0;
	border-bottom: 3px solid #e8e8e8;
}

.pmd-tab {
	padding: 14px 22px;
	border: none;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	background: transparent;
	color: #7a7a7a;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	cursor: pointer;
	position: relative;
	bottom: -3px;
	transition: color 0.2s, border-color 0.2s;
}

.pmd-tab:hover {
	color: #333;
	border-bottom-color: #ccc;
	background: transparent;
}

.pmd-tab.is-active {
	color: #2271b1;
	border-bottom-color: #2271b1;
	background: transparent;
}

/* --------------------------------------------------------------------------
   Panels
   -------------------------------------------------------------------------- */

.pmd-panel {
	display: none;
	padding: 28px 24px;
	border: none;
	background: #fff;
}

.pmd-panel.is-active {
	display: block;
}

.pmd-panel__title {
	margin: 0 0 20px;
	font-size: 20px;
}

/* --------------------------------------------------------------------------
   Product list
   -------------------------------------------------------------------------- */

.pmd-product-list {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 10px;
	margin-bottom: 28px;
}

.pmd-product-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.pmd-product-item:hover {
	border-color: #bbb;
	background: #fafafa;
}

.pmd-product-item:has(.pmd-product-check:checked) {
	border-color: #2271b1;
	background: #f0f6fc;
}

.pmd-product-check {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: #2271b1;
	cursor: pointer;
}

.pmd-product-item__img {
	width: 60px;
	height: 60px;
	flex-shrink: 0;
	border-radius: 4px;
	overflow: hidden;
}

.pmd-product-item__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pmd-product-item__name {
	flex: 1;
	font-size: 15px;
}

.pmd-product-item__view {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border: 1px solid #2271b1;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 600;
	color: #2271b1;
	text-decoration: none;
	white-space: nowrap;
	vertical-align: middle;
	transition: background 0.15s, color 0.15s;
}

.pmd-product-item__view:hover {
	background: #2271b1;
	color: #fff;
}

.pmd-product-item__price {
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Panel navigation buttons
   -------------------------------------------------------------------------- */

.pmd-panel-nav {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 8px;
}

.pmd-btn {
	padding: 10px 22px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s;
}

.pmd-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.pmd-btn--primary {
	background: #2271b1;
	color: #fff;
}

.pmd-btn--primary:hover:not(:disabled) {
	background: #135e96;
}

.pmd-btn--secondary {
	background: #f0f0f0;
	color: #333;
}

.pmd-btn--secondary:hover:not(:disabled) {
	background: #ddd;
}

/* --------------------------------------------------------------------------
   User details form
   -------------------------------------------------------------------------- */

.pmd-form-row {
	margin-bottom: 20px;
}

.pmd-label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
	font-size: 14px;
}

.pmd-input {
	width: 100%;
	max-width: 420px;
	padding: 9px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.pmd-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,.2);
}

.pmd-input.pmd-input--error {
	border-color: #c0392b;
}

.pmd-field-error {
	display: block;
	margin-top: 4px;
	color: #c0392b;
	font-size: 13px;
}

/* Honeypot */
.pmd-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	opacity: 0;
	height: 0;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Messages
   -------------------------------------------------------------------------- */

.pmd-message {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 20px;
	font-size: 14px;
}

.pmd-message--error {
	background: #fdecea;
	border: 1px solid #f5c6c2;
	color: #922b21;
}

.pmd-message--success {
	background: #eafaf1;
	border: 1px solid #a9dfbf;
	color: #1e6644;
}

/* --------------------------------------------------------------------------
   Running total bar
   -------------------------------------------------------------------------- */

.pmd-total-bar {
	position: sticky;
	bottom: 0;
	z-index: 100;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
	padding: 14px 24px;
	background: #1d2327;
	color: #fff;
	border-radius: 0 0 6px 6px;
	font-size: 16px;
}

.pmd-total-bar__label {
	font-weight: 400;
	opacity: 0.85;
}

.pmd-total-bar__amount {
	font-size: 22px;
	font-weight: 700;
}

/* Make WC price amount inherit colour */
.pmd-total-bar__amount .woocommerce-Price-amount {
	color: inherit;
}

/* --------------------------------------------------------------------------
   Notice (no products)
   -------------------------------------------------------------------------- */

.pmd-notice {
	padding: 16px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media ( max-width: 700px ) {
	.pmd-product-list {
		grid-template-columns: repeat( 2, 1fr );
	}
}

@media ( max-width: 600px ) {
	.pmd-tab {
		font-size: 12px;
		padding: 8px 12px;
	}

	.pmd-panel {
		padding: 20px 16px;
	}

	.pmd-product-list {
		grid-template-columns: 1fr;
	}

	.pmd-input {
		max-width: 100%;
	}
}
