/* contact_form — this component's own styles, loaded where it is drawn ({% put styles %}).
   Colours and sizes only through var(--*), so the design drives these too. */

.contact-form label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .4rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: .97rem;
  margin-bottom: .35rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--mark, var(--primary));
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.contact-form [aria-invalid="true"] { border-color: var(--danger); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .field-error:empty { display: none; }
.contact-form .field-error { margin: 0 0 .8rem; font-size: .85rem; color: var(--danger); }

/* card — the form raised on a surface of its own: draws the eye to it
   without moving anything else. */
.contact-form--card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.contact-form__title { margin: 0 0 1.2rem; font-size: 1.3rem; }

/* What it is about: a record (or an area), its kind and price, «×». */
.about-card {
  display: flex; align-items: center; gap: .9rem;
  margin-bottom: 1.3rem; padding: .7rem .9rem;
  border-radius: var(--radius); background: var(--tint);
}
.about-card__media { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: var(--radius-small); overflow: hidden; background: var(--surface); color: var(--muted); flex: none; }
.about-card__media img { width: 100%; height: 100%; object-fit: cover; }
.about-card__media svg { width: 1.4rem; height: 1.4rem; }
.about-card__text { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.about-card__text small { color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.about-card__text a { color: var(--ink); font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.about-card__text a:hover { color: var(--mark, var(--primary)); }
.about-card__price { font-size: .88rem; color: var(--body-text); }
.about-card__remove { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; color: var(--muted); font-size: 1.3rem; line-height: 1; text-decoration: none; flex: none; }
.about-card__remove:hover { color: var(--ink); background: var(--hover-wash); }

/* «How can we reach you»: the phone and the e-mail, one is enough. */
.reach-group { margin: 0 0 .9rem; padding: 0; border: 0; min-width: 0; }
.reach-group legend { padding: 0; margin-bottom: .2rem; font-size: .85rem; font-weight: 600; color: var(--ink); }
.reach-group__hint { margin: 0 0 .7rem; font-size: .85rem; color: var(--muted); }
.reach-group label { font-weight: 500; color: var(--body-text); }
.reach-group.is-invalid input { border-color: var(--danger); }

/* A field nobody sees — out of sight, not `display: none` (bots skip those). */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact-form__send { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.2rem; margin-top: .6rem; }
.contact-form__when { font-size: .88rem; color: var(--muted); }
.contact-form .btn[disabled] { opacity: .7; cursor: progress; }
.chars-left { margin: -.1rem 0 .6rem; font-size: .82rem; color: var(--warning); text-align: right; }

/* Sent: what happened, instead of the form. */
.contact-sent { display: grid; gap: .9rem; justify-items: start; outline: none; }
.contact-sent__mark { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 999px; background: var(--success-soft); color: var(--success); }
.contact-sent__mark svg { width: 1.4rem; height: 1.4rem; }
.contact-sent h2 { margin: 0; font-size: 1.4rem; }
.contact-sent p { margin: 0; }
.contact-sent__copy { width: 100%; padding: .2rem 0 .2rem 1rem; border-left: 2px solid var(--line); color: var(--body-text); }
.contact-sent__copy > span { display: block; margin-bottom: .3rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-sent__about { color: var(--ink); font-weight: 600; }
.contact-sent__acts { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem; margin-top: .4rem; }
.contact-sent__again { font-size: .92rem; color: var(--mark, var(--primary)); }

@media (max-width: 559px) {
  .contact-form--card { padding: 1.2rem; }
}
