/**
 * My List page (Aquael-inspired).
 *
 * @package Zenova_Child
 */

.zenova-my-list {
	padding-block-end: var(--zenova-space-xl);
}

.zenova-my-list__hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
	gap: 2rem 3rem;
	align-items: start;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid var(--zenova-color-border);
}

.zenova-my-list__header {
	margin: 0;
}

.zenova-my-list__title {
	margin: 0;
	font-size: clamp(2rem, 3.5vw, 2.75rem);
	font-weight: 400;
	line-height: 1.15;
	color: var(--zenova-color-text);
}

/* Get a Quote */
.zenova-my-list-get-quote {
	padding-bottom: 0;
	border-bottom: 0;
}

.zenova-my-list-get-quote__title {
	margin: 0 0 1rem;
	font-size: clamp(1.375rem, 2.5vw, 1.75rem);
	font-weight: 600;
	line-height: 1.25;
	color: var(--zenova-color-text);
}

.zenova-my-list-get-quote__intro {
	max-width: none;
	margin: 0 0 1.5rem;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--zenova-color-muted);
}

.zenova-my-list-get-quote__contact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 2.5rem;
}

.zenova-my-list-get-quote__contact-item {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
	margin: 0;
	font-size: 1rem;
	line-height: 1.4;
}

.zenova-my-list-get-quote__contact-label {
	font-weight: 600;
	color: var(--zenova-color-text);
}

.zenova-my-list-get-quote__contact-link {
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--zenova-color-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

.zenova-my-list-get-quote__contact-link:hover,
.zenova-my-list-get-quote__contact-link:focus-visible {
	color: var(--zenova-color-accent);
	text-decoration: underline;
}

@media (max-width: 921px) {
	.zenova-my-list__hero {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.zenova-my-list-get-quote__contact {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
}

/* Items List */
.zenova-my-list-items {
	margin-top: 2.5rem;
}

.zenova-my-list-items__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.375rem, 2.5vw, 1.75rem);
	font-weight: 600;
	line-height: 1.25;
	color: var(--zenova-color-text);
}

.zenova-my-list-items__empty {
	margin: 0 0 1.5rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--zenova-color-muted);
}

.zenova-my-list-items__table-wrap {
	width: 66.666%;
	max-width: 100%;
}

.zenova-my-list-items__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	border: 0;
}

.zenova-my-list-items__table th,
.zenova-my-list-items__table td {
	border-left: 0;
	border-right: 0;
	border-top: 0;
}

.zenova-my-list-items__head {
	padding: 2rem 1rem;
	border-bottom: 1px solid var(--zenova-color-border);
	font-size: 1.875rem;
	font-weight: 400;
	line-height: 1.3;
	text-align: left;
	color: #999999;
}

.zenova-my-list-items__head--config {
	width: 7.5rem;
	padding-left: 50px;
}

.zenova-my-list-items__head--product {
	padding-left: 0;
}

.zenova-my-list-items__head--quantity {
	width: 8.5rem;
	text-align: center;
}

.zenova-my-list-items__cell {
	padding: 2rem 1rem;
	border-bottom: 1px solid var(--zenova-color-border);
	font-size: 1.875rem;
	font-weight: 400;
	line-height: 1.45;
	color: #999999;
	vertical-align: middle;
}

.zenova-my-list-items__cell--config {
	padding-left: 50px;
}

.zenova-my-list-items__config-image,
.zenova-my-list-items__config-placeholder,
.zenova-my-list-items__config-code {
	display: block;
	width: 72px;
	height: 72px;
}

.zenova-my-list-items__config-image {
	object-fit: contain;
}

/*
 * Stands in for a missing diagram. Sized like the image so the column does not
 * jump, and readable rather than decorative — it is the row's only statement of
 * which configuration was chosen.
 */
.zenova-my-list-items__config-code {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.25rem;
	border: 1px solid var(--zenova-color-border);
	font-size: 0.875rem;
	line-height: 1.2;
	text-align: center;
	word-break: break-word;
	color: var(--zenova-color-text);
}

/* Shown when a term has no diagram uploaded, or the image fails to load. */
.zenova-my-list-items__config-placeholder {
	border: 1px solid var(--zenova-color-border);
	background-color: #f2f2f2;
	background-image: linear-gradient(135deg, transparent 46%, #cccccc 46%, #cccccc 54%, transparent 54%);
}

.zenova-my-list-items__cell--product {
	padding-left: 0;
}

.zenova-my-list-items__cell--quantity {
	text-align: center;
}

.zenova-my-list-items__quantity-wrap {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	min-width: 5.5rem;
	background: #f3f3f3;
}

.zenova-my-list-items__quantity {
	width: 3.25rem;
	margin: 0;
	padding: 0.35rem 0.5rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-size: 1.875rem;
	font-weight: 400;
	line-height: 1.2;
	text-align: left;
	color: var(--zenova-color-text);
	-moz-appearance: textfield;
}

.zenova-my-list-items__quantity::-webkit-outer-spin-button,
.zenova-my-list-items__quantity::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.zenova-my-list-items__quantity:focus {
	outline: none;
}

.zenova-my-list-items__quantity-controls {
	display: flex;
	flex-direction: column;
	width: 1.5rem;
	border-left: 1px solid #dddddd;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.zenova-my-list-items__quantity-wrap:hover .zenova-my-list-items__quantity-controls,
.zenova-my-list-items__quantity-wrap:focus-within .zenova-my-list-items__quantity-controls {
	opacity: 1;
	pointer-events: auto;
}

.zenova-my-list-items__quantity-btn {
	flex: 1 1 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.zenova-my-list-items__quantity-btn:hover,
.zenova-my-list-items__quantity-btn:focus-visible {
	background: #e0e0e0;
}

.zenova-my-list-items__quantity-btn--up::before {
	content: '';
	display: block;
	width: 0;
	height: 0;
	border-left: 0.3rem solid transparent;
	border-right: 0.3rem solid transparent;
	border-bottom: 0.35rem solid #666666;
}

.zenova-my-list-items__quantity-btn--down::before {
	content: '';
	display: block;
	width: 0;
	height: 0;
	border-left: 0.3rem solid transparent;
	border-right: 0.3rem solid transparent;
	border-top: 0.35rem solid #666666;
}

.zenova-my-list-items__product-link {
	color: inherit;
	text-decoration: none;
}

.zenova-my-list-items__product-link:hover,
.zenova-my-list-items__product-link:focus-visible {
	color: var(--zenova-color-accent);
	text-decoration: underline;
}

.zenova-my-list-items__update {
	margin-top: 1.5rem;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--zenova-color-text);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	cursor: pointer;
	box-shadow: none;
}

.zenova-my-list-items__update:hover,
.zenova-my-list-items__update:focus,
.zenova-my-list-items__update:focus-visible {
	color: var(--zenova-color-text);
	background: none;
	text-decoration: underline;
}

.zenova-my-list-items__update:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	text-decoration: none;
}

/* Contact information */
.zenova-my-list-contact {
	margin-top: 2rem;
	width: 66.666%;
	max-width: 100%;
}

.zenova-my-list-contact__title {
	margin: 0 0 1.25rem;
	font-size: clamp(1.375rem, 2.5vw, 1.75rem);
	font-weight: 600;
	line-height: 1.25;
	color: var(--zenova-color-text);
}

.zenova-my-list-contact__notice {
	margin: 0 0 1.25rem;
	padding: 0.875rem 1rem;
	border: 1px solid var(--zenova-color-border);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.zenova-my-list-contact__notice--success {
	background: #f4faf4;
	color: #1f5f1f;
}

.zenova-my-list-contact__notice--error {
	background: #fff5f5;
	color: #8a1f1f;
}

/* Not an error — the fields came back and the file could not. Amber, so it
   does not read as a second thing having gone wrong. */
.zenova-my-list-contact__notice--reattach {
	background: #fffdf3;
}

.zenova-my-list-contact__fieldset {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.zenova-my-list-contact__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.zenova-my-list-contact__field {
	margin-bottom: 1.25rem;
}

.zenova-my-list-contact__label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.4;
	color: var(--zenova-color-text);
}

.zenova-my-list-contact__label--required::after {
	content: ' *';
	color: #b42318;
}

.zenova-my-list-contact__input,
.zenova-my-list-contact__textarea {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.75rem 0.875rem;
	border: 1px solid var(--zenova-color-border);
	border-radius: 2px;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: var(--zenova-color-text);
}

.zenova-my-list-contact__input {
	background-color: #fafafa;
}

.zenova-my-list-contact__input:-webkit-autofill,
.zenova-my-list-contact__input:-webkit-autofill:hover,
.zenova-my-list-contact__input:-webkit-autofill:focus {
	-webkit-box-shadow: 0 0 0 1000px #fafafa inset;
	box-shadow: 0 0 0 1000px #fafafa inset;
	-webkit-text-fill-color: var(--zenova-color-text);
}

.zenova-my-list-contact__textarea {
	background-color: #fafafa;
	min-height: 8rem;
	resize: vertical;
}

.zenova-my-list-contact__input:focus,
.zenova-my-list-contact__textarea:focus {
	border-color: var(--zenova-color-text);
	outline: none;
}

.zenova-my-list-contact__input--error,
.zenova-my-list-contact__textarea--error {
	border-color: #b42318;
}

.zenova-my-list-contact__error {
	margin: 0.35rem 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: #b42318;
}

.zenova-my-list-contact__file {
	position: relative;
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	cursor: pointer;
}

.zenova-my-list-contact__file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	opacity: 0;
}

.zenova-my-list-contact__file-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--zenova-color-border);
	border-radius: 2px;
	background: #fafafa;
	font-size: 0.9375rem;
	line-height: 1.2;
	color: var(--zenova-color-text);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.zenova-my-list-contact__file:hover .zenova-my-list-contact__file-btn,
.zenova-my-list-contact__file:focus-within .zenova-my-list-contact__file-btn {
	border-color: var(--zenova-color-text);
}

.zenova-my-list-contact__file-name {
	font-size: 0.9375rem;
	color: var(--zenova-color-muted);
}

.zenova-my-list-contact__file-hint {
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: #666666;
}

.zenova-my-list-contact__actions {
	margin-top: 1.5rem;
}

.zenova-my-list-contact__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.75rem 1.5rem;
	border: 1px solid #000000;
	border-radius: 2px;
	background: #000000;
	font: inherit;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.2;
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.zenova-my-list-contact__submit:hover,
.zenova-my-list-contact__submit:focus-visible {
	background: rgba(255, 255, 255, 0.5);
	border-color: rgba(0, 0, 0, 0.2);
	color: #000000;
}

@media (max-width: 921px) {
	.zenova-my-list-items__head--quantity,
	.zenova-my-list-items__cell--quantity {
		width: 6.5rem;
	}
}

/* Narrow screens: drop the table grid — stack diagram over label, quantity right. */
@media (max-width: 640px) {
	.zenova-my-list-items__table-wrap {
		width: 100%;
	}

	.zenova-my-list-items__table {
		table-layout: auto;
	}

	.zenova-my-list-items__table thead {
		display: none;
	}

	.zenova-my-list-items__table tbody {
		display: block;
	}

	.zenova-my-list-items__row {
		display: grid;
		grid-template-columns: 1fr auto;
		align-items: center;
		gap: 0.5rem 1rem;
		padding: 1.5rem 0;
		border-bottom: 1px solid var(--zenova-color-border);
	}

	.zenova-my-list-items__cell {
		display: block;
		padding: 0;
		border-bottom: 0;
		font-size: 1.25rem;
	}

	.zenova-my-list-items__cell--config {
		grid-column: 1;
		grid-row: 1;
		padding-left: 0;
	}

	.zenova-my-list-items__cell--product {
		grid-column: 1;
		grid-row: 2;
	}

	.zenova-my-list-items__head--quantity,
	.zenova-my-list-items__cell--quantity {
		width: auto;
		grid-column: 2;
		grid-row: 1 / span 2;
		text-align: right;
	}
}
