/* Personalized Add to Cart — estilos do stepper */

.pac-stepper-wrapper {
	--pac-primary: #1d3557;
	--pac-accent: #e63946;
	--pac-border: #e2e2e2;
	--pac-bg-soft: #f7f7f8;
	margin: 20px 0;
	max-width: 560px;
}

/* Indicador de passos */
.pac-steps-indicator {
	display: flex;
	align-items: center;
	margin-bottom: 22px;
}
.pac-step-dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--pac-bg-soft);
	border: 2px solid var(--pac-border);
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 600;
	flex-shrink: 0;
	transition: all 0.2s ease;
}
.pac-step-dot.active {
	background: var(--pac-primary);
	border-color: var(--pac-primary);
	color: #fff;
}
.pac-step-line {
	flex: 1;
	height: 2px;
	background: var(--pac-border);
	margin: 0 6px;
}

/* Passos */
.pac-step {
	display: none;
}
.pac-step.pac-active {
	display: block;
	animation: pac-fade-in 0.25s ease;
}
@keyframes pac-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.pac-step-title {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 600;
	color: var(--pac-primary);
}

/* Tabela de variações nativa — só ajustes ligeiros */
.pac-step table.variations {
	width: 100%;
	margin-bottom: 14px;
}
.pac-step table.variations td.label {
	font-weight: 600;
	padding-bottom: 6px;
}
.pac-step table.variations select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--pac-border);
	border-radius: 8px;
	background: #fff;
}
.pac-step .reset_variations {
	display: inline-block;
	margin-bottom: 14px;
	font-size: 12px;
	color: #888;
}

/* Botões */
.pac-btn {
	appearance: none;
	border: none;
	border-radius: 8px;
	padding: 13px 20px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.1s ease;
}
.pac-btn:active {
	transform: scale(0.98);
}
.pac-btn-next {
	background: var(--pac-primary);
	color: #fff;
	width: 100%;
}
.pac-btn-next:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.pac-btn-back {
	background: transparent;
	color: var(--pac-primary);
	text-decoration: underline;
	padding: 13px 8px;
}
.pac-step-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}
.pac-step-actions .pac-btn-next {
	width: auto;
	flex: 1;
}

/* Campos do passo 2 */
.pac-field {
	margin: 0 0 14px;
}
.pac-field label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #333;
	margin-bottom: 6px;
}
.pac-input,
.pac-textarea {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--pac-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
}
.pac-input:focus,
.pac-textarea:focus {
	outline: none;
	border-color: #e2e2e2 !important;
}

input#pac_pet_name {
    border-color: #e2e2e2;
}

input#pac_pet_breed {
    border-color: #e2e2e2;
}
.pac-textarea {
	resize: vertical;
}

/* =====================================================================
 * Upload de fotografias
 * ================================================================== */

.pac-uploader {
	--pac-success: #2f8a4f;
	--pac-radius: 14px;
	position: relative;
	margin-bottom: 12px;
}

/* Zona inicial (sem fotografias) */
.pac-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 30px 18px;
	border: 1.5px dashed color-mix(in srgb, var(--pac-primary) 35%, transparent);
	border-radius: var(--pac-radius);
	background: var(--pac-bg-soft);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.pac-dropzone:hover,
.pac-dropzone:focus-visible {
	border-color: var(--pac-primary);
	background: color-mix(in srgb, var(--pac-primary) 5%, #fff);
	outline: none;
}
.pac-dropzone-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: #fff;
	color: var(--pac-primary);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.pac-dropzone-text {
	font-weight: 700;
	font-size: 15px;
	color: var(--pac-primary);
}
.pac-dropzone-rule {
	font-size: 13px;
	font-weight: 600;
	color: #333;
}
.pac-dropzone-hint {
	font-size: 12px;
	color: #8a8a8a;
}
.pac-uploader.has-items .pac-dropzone {
	display: none;
}

/* Arrastar ficheiros por cima */
.pac-uploader.is-dragover .pac-dropzone,
.pac-uploader.is-dragover .pac-upload-grid {
	border-color: var(--pac-primary);
	background: color-mix(in srgb, var(--pac-primary) 7%, #fff);
}
.pac-uploader.is-dragover .pac-dropzone {
	transform: scale(1.01);
}

/* Grelha de fotografias */
.pac-upload-grid {
	display: none;
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 10px;
	margin: 0;
	padding: 10px;
	list-style: none;
	border: 1.5px dashed transparent;
	border-radius: var(--pac-radius);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.pac-uploader.has-items .pac-upload-grid {
	display: grid;
	background: var(--pac-bg-soft);
}

.pac-tile {
	position: relative;
	aspect-ratio: 1 / 1;
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--pac-border);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	animation: pac-tile-in 0.22s ease both;
}
.pac-tile.is-leaving {
	animation: pac-tile-out 0.18s ease both;
}
@keyframes pac-tile-in {
	from { opacity: 0; transform: scale(0.92); }
	to   { opacity: 1; transform: scale(1); }
}
@keyframes pac-tile-out {
	to { opacity: 0; transform: scale(0.9); }
}

/* Progresso circular 0–100 % */
.pac-tile-progress {
	position: relative;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pac-ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
}
.pac-ring circle {
	fill: none;
	stroke-width: 3.5;
}
.pac-ring-track {
	stroke: var(--pac-border);
}
.pac-ring-bar {
	stroke: var(--pac-primary);
	stroke-linecap: round;
}
.pac-tile-pct {
	position: relative;
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--pac-primary);
}
.pac-tile-label {
	max-width: 90%;
	font-size: 11px;
	color: #777;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Fotografia carregada */
.pac-tile.is-done {
	border-color: transparent;
}
.pac-tile-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	border-radius: 0 !important;
	animation: pac-img-in 0.35s ease both;
}
@keyframes pac-img-in {
	from { opacity: 0; transform: scale(1.06); }
	to   { opacity: 1; transform: scale(1); }
}

/* Botão remover / cancelar */
.pac-tile-remove {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	width: 26px;
	height: 26px;
	padding: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.95) !important;
	color: #222 !important;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	line-height: 1;
	transition: transform 0.12s ease, background 0.12s ease;
}
.pac-tile-remove:hover {
	background: #fff !important;
	transform: scale(1.08);
}

/* Erro no envio */
.pac-tile.is-error {
	border-color: var(--pac-accent);
	background: color-mix(in srgb, var(--pac-accent) 6%, #fff);
}
.pac-tile-error-icon {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--pac-accent);
	color: #fff;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.pac-tile.is-error .pac-tile-label {
	color: var(--pac-accent);
	font-weight: 600;
}
.pac-tile-retry {
	padding: 0 !important;
	border: none !important;
	background: none !important;
	color: var(--pac-primary) !important;
	font-size: 11px !important;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

/* Cartão "+ Adicionar" */
.pac-tile-add {
	border: 1.5px dashed color-mix(in srgb, var(--pac-primary) 35%, transparent);
	background: transparent;
	animation: none;
}
.pac-tile-add label {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	cursor: pointer;
	color: var(--pac-primary);
	font-size: 12px;
	font-weight: 700;
	border-radius: 12px;
	transition: background 0.15s ease;
}
.pac-tile-add label:hover,
.pac-tile-add label:focus-visible {
	background: #fff;
	outline: none;
}
.pac-tile-add-plus {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

/* Contador + segmentos */
.pac-upload-status {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	margin-top: 12px;
	font-size: 13px;
}
.pac-upload-count {
	font-weight: 700;
	color: #222;
}
.pac-upload-need {
	font-weight: 600;
	color: #8a8a8a;
}
.pac-upload-need.is-ok {
	color: var(--pac-success);
}
.pac-upload-need.is-ok::before {
	content: "✓ ";
}
.pac-upload-meter {
	display: flex;
	gap: 4px;
	margin-top: 8px;
}
.pac-meter-seg {
	flex: 1;
	height: 5px;
	border-radius: 3px;
	background: var(--pac-border);
	transition: background 0.25s ease;
}
.pac-meter-seg.is-min {
	background: color-mix(in srgb, var(--pac-primary) 22%, var(--pac-border));
}
.pac-meter-seg.is-pending {
	background: color-mix(in srgb, var(--pac-primary) 45%, #fff);
	animation: pac-pulse 1s ease-in-out infinite;
}
.pac-meter-seg.is-filled {
	background: var(--pac-primary);
}
@keyframes pac-pulse {
	50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
	.pac-tile,
	.pac-tile-img,
	.pac-meter-seg.is-pending {
		animation: none;
	}
}

.pac-error-msg {
	color: var(--pac-accent);
	font-size: 13px;
	margin: 4px 0 10px;
	font-weight: 600;
}

/* Caixa de compra (preço + botão), dentro do último passo */
.pac-step .pac-buy {
	margin-top: 6px;
}
.pac-step .woocommerce-variation-price {
	margin-bottom: 10px;
	font-size: 15px;
}
.pac-step .pac-buy .single_add_to_cart_button {
	width: 100%;
	padding: 15px 20px !important;
	font-size: 16px !important;
	border-radius: 8px !important;
	float: none !important;
}
.pac-step .single_add_to_cart_button.pac-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.pac-step-title .pac-optional {
	font-weight: 400;
	font-size: 12px;
	color: #888;
}

/* Miniaturas no carrinho / checkout */
.pac-cart-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}
.pac-cart-thumb-img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

/* Admin — miniatura na página de encomenda */
.pac-admin-image {
	margin-top: 8px;
}

@media (max-width: 480px) {
	.pac-stepper-wrapper {
		max-width: 100%;
	}
}
