/* ==========================================================================
   apartmentsforsale.in — universal lead form styles
   /assets/afs-form.css

   Self-contained. Falls back to the brand palette if the host page hasn't
   defined the CSS variables, so it looks right on WordPress too.
   ========================================================================== */

[data-afs-form] {
  --afs-navy:   var(--navy, #0D1B2A);
  --afs-navy-2: var(--navy-700, #1B3550);
  --afs-gold:   var(--gold, #C9A84C);
  --afs-paper:  var(--paper, #F7F5F0);
  --afs-line:   var(--line, #E4E0D6);
  --afs-ink:    var(--ink, #16202E);
  --afs-slate:  var(--slate, #5C6B7A);
  --afs-light:  var(--slate-light, #8A97A4);
  --afs-green:  #1F7A5A;
  --afs-green-t:#E9F5F0;
  --afs-red:    #B3372C;
  --afs-red-t:  #FBEEEC;
  --afs-sans:   var(--sans, 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, sans-serif);
  --afs-serif:  var(--serif, 'Fraunces', Georgia, serif);
  font-family: var(--afs-sans);
}

.afs-card {
  border: 1px solid var(--afs-line);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(13,27,42,.06), 0 2px 8px rgba(13,27,42,.05);
}

.afs-head {
  background: linear-gradient(135deg, var(--afs-navy), var(--afs-navy-2));
  color: #fff;
  padding: 1.3rem 1.4rem;
}
.afs-head h2 {
  font-family: var(--afs-serif);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #fff;
  margin: 0 0 .3rem;
}
.afs-head p { margin: 0; font-size: .86rem; color: #B9C6D3; line-height: 1.5; }

.afs-body { padding: 1.3rem 1.4rem; }

/* Honeypot. Bots see a field. Humans see nothing. */
.afs-honey {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.afs-field { margin-bottom: .85rem; }
.afs-field label {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  color: var(--afs-slate);
  margin-bottom: .3rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.afs-opt { text-transform: none; font-weight: 500; color: var(--afs-light); }

.afs-field input,
.afs-field select,
.afs-field textarea {
  width: 100%;
  padding: .68rem .8rem;
  border: 1.5px solid var(--afs-line);
  border-radius: 10px;
  font-family: var(--afs-sans);
  font-size: .94rem;
  color: var(--afs-ink);
  background: #fff;
  transition: border-color .15s;
  -webkit-appearance: none;
  appearance: none;
}
.afs-field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235C6B7A' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2rem;
}
.afs-field input:focus,
.afs-field select:focus,
.afs-field textarea:focus {
  border-color: var(--afs-gold);
  outline: none;
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.afs-field input.afs-invalid,
.afs-field select.afs-invalid,
.afs-field textarea.afs-invalid {
  border-color: var(--afs-red);
  background: var(--afs-red-t);
}

/* Country + number, side by side. Country is fixed-width so the number
   never gets squeezed on a narrow rail. */
.afs-phone { display: grid; grid-template-columns: 118px 1fr; gap: .5rem; }
.afs-phone select { min-width: 0; font-size: .86rem; padding-left: .6rem; }
.afs-phone input { min-width: 0; }
@media (max-width: 380px) {
  .afs-phone { grid-template-columns: 1fr; }
}

.afs-err {
  display: block;
  font-size: .78rem;
  color: var(--afs-red);
  margin-top: .3rem;
  line-height: 1.4;
}
.afs-err:empty { display: none; }

.afs-btn {
  width: 100%;
  padding: .85rem 1rem;
  margin-top: .3rem;
  border: 0;
  border-radius: 999px;
  font-family: var(--afs-sans);
  font-weight: 700;
  font-size: .96rem;
  cursor: pointer;
  background: var(--afs-navy);
  color: #fff;
  transition: background .15s, transform .15s;
}
.afs-btn:hover:not(:disabled) { background: #12233A; transform: translateY(-1px); }
.afs-btn:disabled { opacity: .65; cursor: default; }

.afs-msg {
  margin-top: .8rem;
  border-radius: 10px;
  font-size: .86rem;
  line-height: 1.5;
}
.afs-msg:empty { display: none; }
.afs-ok-box {
  display: block;
  padding: .7rem .85rem;
  background: var(--afs-green-t);
  color: var(--afs-green);
  border: 1px solid #BFE3D5;
}
.afs-err-box {
  display: block;
  padding: .7rem .85rem;
  background: var(--afs-red-t);
  color: var(--afs-red);
  border: 1px solid #F0C9C4;
}
.afs-err-box a { color: inherit; text-decoration: underline; }
.afs-detail {
  display: block;
  margin-top: .45rem;
  opacity: .75;
  font-size: .76rem;
  overflow-wrap: anywhere;
}

.afs-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin-top: .6rem;
  padding: .78rem 1rem;
  background: var(--afs-paper);
  color: var(--afs-navy);
  border: 1.5px solid var(--afs-line);
  border-radius: 999px;
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  transition: border-color .15s, color .15s;
}
.afs-wa:hover { border-color: var(--afs-gold); color: #A9863A; }

.afs-note {
  font-size: .74rem;
  color: var(--afs-light);
  margin: .75rem 0 0;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .afs-btn, .afs-wa, .afs-field input, .afs-field select { transition: none; }
}

/* ---- textarea ---- */
.afs-field textarea {
  resize: vertical;
  min-height: 78px;
  line-height: 1.55;
  font-family: var(--afs-sans);
}

/* ---- required marker ---- */
.afs-req { color: var(--afs-red); font-weight: 700; margin-left: .1em; }

/* ---- consent checkbox ----
   Never pre-ticked. Under India's DPDP Act 2023, consent must be freely
   given, specific and unambiguous — a pre-ticked box is not consent. */
.afs-consent {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin: 1rem 0 .2rem;
  padding: .75rem .85rem;
  border: 1.5px solid var(--afs-line);
  border-radius: 10px;
  background: var(--afs-paper);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.afs-consent:hover { border-color: #CFC9B8; }
.afs-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: .12rem 0 0;
  accent-color: var(--afs-navy);
  cursor: pointer;
}
.afs-consent span {
  font-size: .82rem;
  line-height: 1.5;
  color: var(--afs-slate);
}
.afs-consent a {
  color: var(--afs-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.afs-consent a:hover { color: #A9863A; }
.afs-consent-bad {
  border-color: var(--afs-red);
  background: var(--afs-red-t);
}
.afs-consent-bad span { color: var(--afs-ink); }

/* the consent error sits outside the label, so give it room */
.afs-err[data-for="consent"] { margin-bottom: .5rem; }
