/* Estilos mínimos dos elementos do plugin. As cores vêm das variáveis do tema (theme.json). */
.ip3d-icon { display: block; width: 1.25em; height: 1.25em; }

.ip3d-social { display: flex; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.ip3d-social a {
	display: grid; place-items: center; width: 42px; height: 42px;
	color: inherit; border: 1px solid var(--wp--preset--color--line, #ddd); border-radius: 999px;
	transition: background-color .15s ease, color .15s ease;
}
.ip3d-social a:hover, .ip3d-social a:focus-visible { background: var(--wp--preset--color--tint, #EEF4FB); color: var(--wp--preset--color--blue-strong, #1E5A9E); }

.ip3d-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.ip3d-contact li { display: flex; align-items: center; gap: .5rem; }
.ip3d-contact a { color: inherit; }

.ip3d-legal { font-size: .875rem; margin: 0; }

/* Botão flutuante: discreto, segue o modo claro/escuro (cores do tema); no telemóvel é um círculo de 56 px só com o ícone. */
.ip3d-whatsapp-float {
	position: fixed; right: 20px; bottom: 20px; z-index: 50;
	display: inline-flex; align-items: center; gap: .5rem;
	min-height: 48px; padding: .55rem 1rem .55rem .75rem;
	background: var(--wp--preset--color--surface, #fff); color: var(--wp--preset--color--ink, #111);
	text-decoration: none; font-weight: 600; font-size: .9375rem;
	border: 0; border-radius: 999px;
	box-shadow: 0 1px 2px rgba(15,23,32,.08), 0 6px 18px rgba(15,23,32,.12);
	transition: box-shadow .15s ease, transform .15s ease;
}
.ip3d-whatsapp-float .ip3d-icon { color: #128C3E; width: 1.4em; height: 1.4em; }
/* No escuro a sombra não se vê: a elevação passa a ser só o contorno (uma coisa ou outra, nunca as duas). */
:root[data-theme="dark"] .ip3d-whatsapp-float { box-shadow: none; border: 1px solid var(--wp--preset--color--line); }
:root[data-theme="dark"] .ip3d-whatsapp-float .ip3d-icon { color: #25D366; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ip3d-whatsapp-float { box-shadow: none; border: 1px solid var(--wp--preset--color--line); }
	:root:not([data-theme="light"]) .ip3d-whatsapp-float .ip3d-icon { color: #25D366; }
}
.ip3d-whatsapp-float:hover, .ip3d-whatsapp-float:focus-visible { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(15,23,32,.1), 0 10px 26px rgba(15,23,32,.18); }
@media (max-width: 781px) {
	.ip3d-whatsapp-float { box-sizing: border-box; right: 16px; bottom: 16px; width: 56px; height: 56px; padding: 0; justify-content: center; }
	.ip3d-whatsapp-float .ip3d-icon { width: 28px; height: 28px; }
	.ip3d-whatsapp-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* Telemóvel, página inicial: o topo já tem o botão "Falar no WhatsApp"; o flutuante só aparece depois
   de descer o hero, para não tapar a foto. Sem suporte de animação por scroll, fica sempre visível. */
@keyframes ip3d-wa-in { from { opacity: 0; visibility: hidden; transform: translateY(12px); } to { opacity: 1; visibility: visible; transform: none; } }
@media (max-width: 781px) {
	@supports (animation-timeline: scroll()) {
		.home .ip3d-whatsapp-float { animation: ip3d-wa-in linear both; animation-timeline: scroll(root); animation-range: 480px 620px; }
	}
}
@media (prefers-reduced-motion: reduce) { .ip3d-social a, .ip3d-whatsapp-float { transition: none; } }

/* Filtro do portfólio */
.ip3d-filter ul { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; }
.ip3d-filter a {
	display: inline-block; padding: .45rem .9rem; border: 1px solid var(--wp--preset--color--line, #ddd); border-radius: 999px;
	text-decoration: none; color: inherit; font-size: .95rem;
}
.ip3d-filter a[aria-current="page"] { background: var(--wp--preset--color--blue-strong, #1E5A9E); border-color: transparent; color: var(--ip3d-btn-text, #fff); }
.ip3d-filter span { opacity: .7; }

/* Ficha técnica do trabalho */
.ip3d-specs { display: grid; gap: .25rem; margin: 1rem 0; padding: 1rem; border: 1px solid var(--wp--preset--color--line, #ddd); border-radius: 10px; }
.ip3d-specs div { display: flex; justify-content: space-between; gap: 1rem; }
.ip3d-specs dt { font-family: var(--wp--preset--font-family--mono, monospace); font-size: .85rem; color: var(--wp--preset--color--muted, #555); }
.ip3d-specs dd { margin: 0; font-weight: 700; text-align: right; }

/* Vídeo do trabalho */
.ip3d-video { margin: 1.25rem 0 0; }
.ip3d-video video { width: 100%; height: auto; display: block; border-radius: 12px; background: #000; }
.ip3d-video figcaption { font-size: .85rem; color: var(--wp--preset--color--muted, #555); margin-top: .35rem; }

/* Formulário de pedido */
.ip3d-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.ip3d-form__row--2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 640px) { .ip3d-form__row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ip3d-field { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; margin: 0; }
.ip3d-field label { font-weight: 600; }
.ip3d-field__opt, .ip3d-field__help { font-weight: 400; font-size: .9rem; color: var(--wp--preset--color--muted, #5A6573); }
.ip3d-field input[type="text"], .ip3d-field input[type="email"], .ip3d-field input[type="tel"],
.ip3d-field select, .ip3d-field textarea {
	width: 100%; box-sizing: border-box; font: inherit; color: inherit;
	padding: .7rem .8rem; min-height: 48px;
	background: var(--wp--preset--color--surface, #fff);
	border: 1px solid #B9C2CC; border-radius: 8px;
}
.ip3d-field input[type="file"] { font: inherit; }
.ip3d-field :is(input, select, textarea):focus { outline: 3px solid var(--wp--preset--color--blue, #78AEEA); outline-offset: 1px; border-color: var(--wp--preset--color--blue-strong, #1E5A9E); }
.ip3d-field [aria-invalid="true"] { border-color: #B3261E; }
.ip3d-field__error { color: #B3261E; font-size: .9rem; font-weight: 600; }
.ip3d-field__error:empty { display: none; }
.ip3d-field--check { grid-template-columns: auto 1fr; align-items: start; column-gap: .6rem; }
.ip3d-field--check input { width: 22px; height: 22px; margin-top: .15rem; }
.ip3d-field--check label { font-weight: 400; }
.ip3d-field--check .ip3d-field__error { grid-column: 1 / -1; }
.ip3d-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ip3d-form button[disabled] { opacity: .6; cursor: progress; }
.ip3d-form__status { margin: 0; font-weight: 600; }
.ip3d-form__status:empty { display: none; }
.ip3d-form__status.is-success { padding: 1rem 1.25rem; border-radius: 10px; background: #E6F4EA; color: #1E5E2E; }
.ip3d-form__status.is-error { color: #B3261E; }
altcha-widget { --altcha-border-radius: 8px; --altcha-color-border: #B9C2CC; --altcha-max-width: 100%; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ip3d-field__error, :root:not([data-theme="light"]) .ip3d-form__status.is-error { color: #FFB4AB; }
}
:root[data-theme="dark"] .ip3d-field__error, :root[data-theme="dark"] .ip3d-form__status.is-error { color: #FFB4AB; }

/* Preço "a partir de" (páginas de serviço) */
.ip3d-price { margin: 0 0 1.25rem; }
.ip3d-price__value { margin: 0; font-size: 1.0625rem; }
.ip3d-price__value strong { font-size: 1.5rem; font-weight: 700; color: var(--wp--preset--color--ink, #1F2A36); }
.ip3d-price__note { margin: .25rem 0 0; font-size: .8125rem; color: var(--wp--preset--color--muted, #5A6573); max-width: 46ch; }
.ip3d-price--quote { font-weight: 600; }

/* Conteúdos externos com consentimento (Facebook) */
.ip3d-embed { padding: 1.25rem; border: 1px dashed var(--wp--preset--color--line, #E2DED6); border-radius: 12px; background: var(--wp--preset--color--tint, #EEF4FB); }
.ip3d-embed.is-loaded { padding: 0; border: 0; background: none; }
.ip3d-embed__text { margin: 0 0 1rem; font-size: .9375rem; }
.ip3d-embed__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin: 0 0 .75rem; }
.ip3d-embed__actions label { display: inline-flex; align-items: center; gap: .4rem; font-size: .875rem; cursor: pointer; }
.ip3d-embed__actions input { width: 1.1rem; height: 1.1rem; accent-color: var(--wp--preset--color--blue-strong, #1E5A9E); }
.ip3d-embed__links { margin: 0; font-size: .8125rem; color: var(--wp--preset--color--muted, #5A6573); }
.ip3d-embed__links a { color: inherit; }
.ip3d-embed__frame { display: block; width: 100%; max-width: 500px; height: 560px; border: 0; border-radius: 8px; background: #fff; }
.ip3d-consent-manager { margin: 1rem 0; }
.ip3d-contact__tel { flex-wrap: wrap; column-gap: .35rem; }
.ip3d-contact__note { font-size: .8125rem; color: var(--wp--preset--color--muted, #5A6573); }

/* Contactos: um por linha, com ícone */
.ip3d-contact li { align-items: flex-start; gap: .6rem; }
.ip3d-contact li > .ip3d-icon { flex: none; width: 1.15em; height: 1.15em; margin-top: .2em; color: var(--wp--preset--color--muted, #5A6573); }
.ip3d-contact li > span { display: flex; flex-direction: column; }
.ip3d-contact__note { display: block; margin-top: .1rem; font-size: .75rem; line-height: 1.3; color: var(--wp--preset--color--muted, #5A6573); white-space: normal; }

/* Livro de Reclamações Eletrónico (botão) */
.ip3d-lre {
	display: inline-flex; align-items: center; gap: .6rem; margin-top: 1rem;
	padding: .5rem .85rem .5rem .65rem; min-height: 48px;
	background: #fff; color: #B4141B !important; text-decoration: none !important;
	border: 2px solid #B4141B; border-radius: 8px; line-height: 1.15;
	transition: background-color .15s ease;
}
.ip3d-lre .ip3d-icon { width: 1.6em; height: 1.6em; }
.ip3d-lre > span { display: flex; flex-direction: column; }
.ip3d-lre strong { font-size: .875rem; }
.ip3d-lre small { font-size: .75rem; color: #1F2A36; }
.ip3d-lre:hover, .ip3d-lre:focus-visible { background: #FDF1F1; }
.ip3d-lre--logo { padding: 0; border: 0; background: none; }
.ip3d-lre--logo img { display: block; width: 140px; height: auto; aspect-ratio: 140 / 58; }
@media (prefers-reduced-motion: reduce) { .ip3d-lre { transition: none; } }

/* Campo de anexos com o estilo do site */
.ip3d-form input[type="file"] { max-width: 100%; font: inherit; font-size: .9375rem; color: var(--wp--preset--color--muted, #5A6573); }
.ip3d-form input[type="file"]::file-selector-button {
	margin-right: .75rem; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer;
	color: var(--wp--preset--color--blue-strong, #1E5A9E); background: var(--wp--preset--color--tint, #EEF4FB);
	border: 1px solid var(--wp--preset--color--line, #E2DED6); border-radius: 8px;
}
.ip3d-form input[type="file"]::file-selector-button:hover { border-color: var(--wp--preset--color--blue-strong, #1E5A9E); }
