/* Popup "Pede orçamento grátis" */
.q-bg {
  position: fixed; inset: 0; z-index: 89;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(10, 10, 10, .5);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  animation: clica-dlg-bg .5s ease both;
}
.q-dlg {
  position: relative;
  width: min(1120px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-radius: 28px;
  color: #FFFFFF;
  background: radial-gradient(560px circle at 18% 12%, rgba(0, 74, 255, .38), transparent 62%), #0A0A0A;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 50px 140px rgba(0, 0, 0, .55);
  animation: clica-dlg .7s cubic-bezier(.2, .9, .2, 1) .08s both;
}
.q-close {
  position: absolute; top: 16px; right: 16px; z-index: 6;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #FFFFFF;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.q-close:hover { background: rgba(255, 255, 255, .2); transform: rotate(90deg); }

.q-col { min-width: 0; }
.q-col-form { padding: 56px 48px 44px; display: flex; flex-direction: column; min-height: 560px; }
.q-col-letter { padding: 56px 40px 40px 8px; display: flex; align-items: center; }

.q-eyebrow { margin: 0 0 22px; font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #8FB0FF; }

.q-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 48px; }
.q-progress span { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); position: relative; overflow: hidden; }
.q-progress span::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s cubic-bezier(.7, 0, .2, 1); }
.q-progress span.on::after { transform: scaleX(1); }

.q-form { flex: 1; display: flex; flex-direction: column; }
.q-step { display: flex; flex-direction: column; gap: 14px; animation: clica-swap .55s cubic-bezier(.2, .8, .2, 1) both; }
.q-count { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; color: #5B8CFF; }
.q-question { margin: 0; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(32px, 3.6vw, 52px); line-height: 1; letter-spacing: -.04em; color: #FFFFFF; }
.q-question:focus { outline: none; }
.q-sub { margin: 0; font-size: 17px; line-height: 1.55; color: #BDBDB8; }

.q-input {
  width: 100%; margin-top: 18px; padding: 10px 0 14px;
  background: transparent; border: 0; border-bottom: 2px solid rgba(255, 255, 255, .25); border-radius: 0;
  color: #FFFFFF; caret-color: var(--accent);
  font-family: 'Space Grotesk', sans-serif; font-weight: 500; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em;
  transition: border-color .25s;
}
.q-input::placeholder { color: rgba(255, 255, 255, .32); }
.q-input:focus { outline: none; border-bottom-color: var(--accent); }
.q-textarea { resize: none; line-height: 1.35; font-size: clamp(19px, 1.9vw, 24px); }
.q-input[aria-invalid="true"] { border-bottom-color: #FF8A7A; }

/* .q-consent: ver o fim do ficheiro */

.q-error { min-height: 24px; margin: 18px 0 0; font-size: 15px; color: #FF8A7A; }

.q-actions { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.q-back, .q-skip {
  min-height: 52px; padding: 0 18px; border: 0; background: none; color: #BDBDB8;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; cursor: pointer; border-radius: 999px;
  transition: color .2s, background .2s;
}
.q-back:hover, .q-skip:hover { color: #FFFFFF; background: rgba(255, 255, 255, .08); }
.q-next {
  --fill: #FFFFFF; --hover-ink: #0A0A0A;
  margin-left: auto; min-height: 56px; padding: 0 28px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #FFFFFF;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.q-next[disabled] { opacity: .6; cursor: progress; }
.q-hint { margin: 14px 0 0; text-align: right; font-size: 13px; color: #8A8A85; }
.q-recaptcha-note { margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: #8A8A85; }
.q-recaptcha-note a { color: inherit; text-decoration: underline; }
.q-hint kbd { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: #BDBDB8; border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; padding: 1px 6px; }

.q-done { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 18px; animation: clica-swap .6s cubic-bezier(.2, .8, .2, 1) both; }
.q-done .q-next { margin: 18px 0 0; }
.q-done-mark { color: var(--accent); animation: clica-corner .7s cubic-bezier(.2, .8, .2, 1) both; }

/* Carta */
.q-letter {
  position: relative; width: 100%;
  border-radius: 18px; overflow: hidden;
  background-color: #F3F3EF;
  background-image: radial-gradient(rgba(10, 10, 10, .1) 1px, transparent 1px); background-size: 20px 20px;
  color: #0A0A0A;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .12);
  transform: rotate(-1deg);
  transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.q-letter.is-sent { transform: rotate(0) translateY(-6px); }
.q-letter-head { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #E4E4DF; font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600; color: #3D3D3A; }
.q-letter-dots { display: flex; gap: 6px; }
.q-letter-dots i { width: 10px; height: 10px; border-radius: 99px; background: #C9C9C3; }
.q-letter-dots i:first-child { background: #FF5F57; }
.q-letter-dots i:nth-child(2) { background: #FEBC2E; }
.q-letter-dots i:nth-child(3) { background: #28C840; }
.q-letter-meta { display: flex; flex-direction: column; gap: 4px; padding: 14px 22px; border-bottom: 1px solid rgba(10, 10, 10, .08); background: rgba(255, 255, 255, .7); font-size: 13px; color: #5A5A55; }
.q-letter-meta b { color: #0A0A0A; font-weight: 600; }
.q-letter-body {
  min-height: 340px; max-height: 420px; overflow-y: auto;
  padding: 26px 24px 34px;
  font-family: 'Space Grotesk', sans-serif; font-size: 20px; line-height: 1.5; letter-spacing: -.01em;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.q-letter-body .q-val { color: var(--accent); font-weight: 700; }
.q-letter-body .q-ph { color: #A6A6A0; }
.q-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -.18em; background: var(--accent); animation: clica-blink 1s steps(1) infinite; }
.q-stamp {
  position: absolute; right: 22px; bottom: 22px;
  padding: 8px 14px; border: 2px solid var(--accent); border-radius: 10px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  transform: rotate(-8deg) scale(1.6); opacity: 0; pointer-events: none;
}
.q-letter.is-sent .q-stamp { animation: q-stamp .5s cubic-bezier(.3, 1.6, .5, 1) .15s forwards; }
@keyframes q-stamp { to { opacity: 1; transform: rotate(-8deg) scale(1); } }

.q-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

html.q-lock { overflow: hidden; }

@media (max-width: 860px) {
  .q-dlg { grid-template-columns: 1fr; }
  .q-col-form { padding: 64px 24px 28px; min-height: 0; }
  .q-col-letter { padding: 0 24px 28px; }
  .q-letter { transform: none; }
  .q-letter-body { min-height: 180px; max-height: 240px; font-size: 17px; }
  .q-progress { margin-bottom: 32px; }
  .q-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .q-caret { animation: none; }
}

/* Contact Form 7 por baixo da UI: o envolvente ocupa a coluna e as mensagens do plugin ficam escondidas
   (os erros aparecem na nossa linha de erro). */
.q-col-form .wpcf7 { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.q-col-form .wpcf7 form[hidden] { display: none; }
.q-col-form .wpcf7 .screen-reader-response,
.q-col-form .wpcf7-response-output {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.q-col-form .wpcf7-not-valid-tip { display: none; }
.q-col-form .wpcf7-spinner { display: none; }
.q-col-form .wpcf7-form-control-wrap { display: block; }
.q-col-form .hidden-fields-container { display: none; border: 0; padding: 0; margin: 0; }

/* Consentimento (a caixa do Contact Form 7 + link para a Política de Privacidade) */
.q-consent { margin-top: 18px; font-size: 16px; line-height: 1.5; color: #E6E6E2; }
.q-consent .wpcf7-list-item { display: block; margin: 0; }
.q-consent label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.q-consent input[type="checkbox"] { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.q-consent a { color: #FFFFFF; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent); transition: color .2s; }
.q-consent a:hover { color: #8FB0FF; }
