/* Tutto Print product configurator. Colours come from the theme's custom properties, with brand fallbacks. */
.tp-cfg {
	--tp-primary: var(--wp--preset--color--primary, #5128ab);
	--tp-primary-dark: var(--wp--preset--color--primary-dark, #3e1e86);
	--tp-ink: var(--wp--preset--color--ink, #1d1b24);
	--tp-muted: var(--wp--preset--color--muted, #4a4556);
	--tp-line: var(--wp--preset--color--line, #d6cfe2);
	--tp-tint: var(--wp--preset--color--tint, #f1ecfb);
	--tp-white: #fff;
	margin-top: 8px;
}
.tp-cfg__form { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.tp-cfg__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.tp-cfg__group[hidden] { display: none; }
.tp-cfg__legend { font-weight: 700; font-size: 15px; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; width: 100%; }
.tp-cfg__current { font-weight: 400; color: var(--tp-muted); }
.tp-cfg__cutoff { margin-left: auto; font-size: 14px; color: var(--tp-primary-dark); }
.tp-cfg__choices { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-cfg__loading { color: var(--tp-muted); font-size: 15px; }

/* Choice buttons (radio inputs kept for keyboard and screen readers). */
.tp-choice, .tp-speed { position: relative; cursor: pointer; }
.tp-choice input, .tp-speed input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tp-choice__label {
	display: inline-flex; flex-direction: column; justify-content: center; min-height: 46px; min-width: 64px; box-sizing: border-box;
	padding: 10px 16px; border: 1px solid var(--tp-line); border-radius: 12px; background: var(--tp-white);
	font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--tp-ink); text-align: center;
}
.tp-choice__label small { display: block; font-size: 12px; font-weight: 400; color: var(--tp-muted); }
.tp-choice:hover .tp-choice__label { border-color: var(--tp-primary); }
.tp-choice input:checked + .tp-choice__label { border: 2px solid var(--tp-primary); padding: 9px 15px; background: var(--tp-tint); color: var(--tp-primary-dark); font-weight: 700; }
.tp-choice input:focus-visible + .tp-choice__label, .tp-speed input:focus-visible + .tp-speed__label { outline: 3px solid var(--tp-primary-dark); outline-offset: 2px; }
.tp-choice input:disabled + .tp-choice__label { display: none; }
.tp-choice.is-unavailable .tp-choice__label { border-style: dashed; color: var(--tp-muted); font-weight: 400; }
.tp-cfg__group--single .tp-choice__label { border: 0; padding: 0; min-height: 0; background: none; color: var(--tp-ink); font-weight: 400; }
.tp-cfg__group--single .tp-choice input:checked + .tp-choice__label { border: 0; padding: 0; background: none; color: var(--tp-ink); font-weight: 400; }
.tp-cfg__group--single .tp-cfg__current { display: none; }

.tp-cfg__select { font: inherit; font-size: 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--tp-line); background: var(--tp-white); color: var(--tp-ink); min-width: 220px; max-width: 100%; }

/* Delivery speeds. */
.tp-cfg__speeds { display: flex; flex-direction: column; gap: 10px; }
.tp-speed__label { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid var(--tp-line); border-radius: 14px; background: var(--tp-white); }
.tp-speed:hover .tp-speed__label { border-color: var(--tp-primary); }
.tp-speed input:checked + .tp-speed__label { border: 2px solid var(--tp-primary); padding: 14px 17px; background: var(--tp-tint); }
.tp-speed__name strong { display: block; font-size: 16px; }
.tp-speed__name span { display: block; font-size: 14px; color: var(--tp-muted); }
.tp-speed__price { font-size: 18px; white-space: nowrap; }

/* Artwork. */
.tp-cfg__artwork { border: 2px dashed #bfb4d3; border-radius: 16px; background: var(--tp-white); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.tp-cfg__artwork-label strong { display: block; font-size: 16px; }
.tp-cfg__artwork-label span { display: block; font-size: 14px; color: var(--tp-muted); }
.tp-cfg__file { font: inherit; font-size: 15px; max-width: 100%; min-height: 44px; }
.tp-cfg__file::file-selector-button { font: inherit; font-weight: 700; padding: 9px 16px; margin-right: 12px; border-radius: 999px; border: 1px solid var(--tp-primary); background: var(--tp-white); color: var(--tp-primary); cursor: pointer; }

/* Summary. */
.tp-cfg__summary { background: var(--tp-white); border: 1px solid var(--wp--preset--color--line, #e6e1ec); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.tp-cfg__total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.tp-cfg__line { font-size: 16px; color: var(--tp-muted); }
.tp-cfg__price { font-size: 30px; font-weight: 800; white-space: nowrap; }
.tp-cfg__price small { font-size: 16px; font-weight: 600; color: var(--tp-muted); }
.tp-cfg__group--qty .tp-cfg__choices { min-height: 48px; }
.tp-choice__hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tp-cfg__speeds:empty { min-height: 220px; }
.tp-cfg__actions { min-height: 56px; }
.tp-cfg__vat { font-size: 13px; color: var(--tp-muted); text-align: right; margin-top: -10px; }
.tp-cfg__vat:empty { display: none; }
.tp-cfg__add { width: 100%; font: inherit; font-size: 18px; font-weight: 700; padding: 16px; border-radius: 999px; border: 0; background: var(--tp-primary); color: var(--tp-white); cursor: pointer; }
.tp-cfg__add:hover { background: var(--tp-primary-dark); }
.tp-cfg__help { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 700; }
.tp-cfg__message { margin: 0; padding: 12px 14px; border-radius: 12px; background: #fff4dc; color: var(--tp-ink); font-size: 15px; }
.tp-cfg.is-loading .tp-cfg__speeds, .tp-cfg.is-loading .tp-cfg__summary .tp-cfg__total { opacity: 0.55; transition: opacity 0.2s; }

.tp-specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.tp-specs th, .tp-specs td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--wp--preset--color--line, #e6e1ec); }
.tp-specs th { width: 30%; font-weight: 700; }
