/* ==========================================================================
   Yonei Estate - design-system layer for native Elementor, Xpro and WPForms
   output. Restores parity with the approved static design and fixes the
   responsive behaviour of the header, the valuation form and the before/after
   comparison slider.
   ========================================================================== */

:root {
  --ye-bg: #f5f3ee;
  --ye-surface: #efece5;
  --ye-ink: #111111;
  --ye-accent: #b88b5b;
  --ye-accent-light: #d0a878;
  --ye-muted: #6d6a66;
  --ye-line: #d9d4cc;
}

/* --- 1. Global guards --------------------------------------------------- */

body { background: var(--ye-bg); }

.elementor img,
.elementor .elementor-button,
.elementor input,
.elementor textarea,
.elementor select {
  border-radius: 0 !important;
}

.ast-page-builder-template .site-content > .ast-container {
  max-width: 100%;
  padding: 0;
}

/* --- 2-3. Header and mobile navigation ---------------------------------
   Moved to yonei-chrome.css, which implements the original overlay pattern.
   ---------------------------------------------------------------------- */

/* --- 4. WPForms: shared structure --------------------------------------- */

.wpforms-container { margin: 0; }

.wpforms-container .wpforms-field-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* Name, message and location span the full width; email and phone pair up. */
.wpforms-container .wpforms-field-name,
.wpforms-container .wpforms-field-textarea,
.wpforms-container .wpforms-field-container > div:nth-child(4) {
  grid-column: 1 / -1;
}

.wpforms-container .wpforms-field {
  padding: 0;
  margin: 0;
}

.wpforms-container .wpforms-field-label {
  display: block;
  margin-bottom: 9px;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.4;
}

.wpforms-container .wpforms-required-label { color: var(--ye-accent); border: 0; }

.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="number"],
.wpforms-container textarea,
.wpforms-container select {
  width: 100%;
  max-width: 100%;
  height: auto;
  padding: 15px 16px;
  background: transparent;
  border: 1px solid var(--ye-line);
  border-radius: 0;
  box-shadow: none;
  font-family: Inter, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition: border-color 0.35s ease;
}

.wpforms-container textarea { min-height: 150px; resize: vertical; }

.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
  outline: 0;
  border-color: var(--ye-accent);
  box-shadow: none;
}

.wpforms-container .wpforms-submit-container {
  grid-column: 1 / -1;
  padding: 0;
  margin-top: 26px;
}

.wpforms-container button[type="submit"] {
  width: 100%;
  padding: 19px 38px;
  background: var(--ye-accent);
  border: 1px solid var(--ye-accent);
  border-radius: 0;
  color: #ffffff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}

.wpforms-container button[type="submit"]:hover {
  background: var(--ye-ink);
  border-color: var(--ye-ink);
  transform: translateY(-2px);
}

.wpforms-container .wpforms-error,
.wpforms-container em.wpforms-error {
  margin-top: 7px;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.02em;
  color: #b3402f;
}

.wpforms-container input.wpforms-error,
.wpforms-container textarea.wpforms-error { border-color: #b3402f; }

.wpforms-confirmation-container-full {
  padding: 20px 22px;
  background: rgba(184, 139, 91, 0.12);
  border: 1px solid var(--ye-accent);
  border-radius: 0;
  color: var(--ye-ink);
  font-family: Inter, sans-serif;
  font-size: 15px;
}

.wpforms-confirmation-container-full p { margin: 0; }

@media (max-width: 620px) {
  .wpforms-container .wpforms-field-container { grid-template-columns: 1fr; }
}

/* --- 5. WPForms: valuation form on the dark card ------------------------ */

#wpforms-64 .wpforms-field-label { color: rgba(245, 243, 238, 0.66); }

#wpforms-64 input[type="text"],
#wpforms-64 input[type="email"],
#wpforms-64 input[type="tel"],
#wpforms-64 textarea {
  border-color: rgba(245, 243, 238, 0.2);
  color: #f5f3ee;
}

#wpforms-64 input::placeholder,
#wpforms-64 textarea::placeholder { color: rgba(245, 243, 238, 0.4); }

#wpforms-64 input:focus,
#wpforms-64 textarea:focus { border-color: var(--ye-accent-light); }

#wpforms-64 .wpforms-required-label { color: var(--ye-accent-light); }

#wpforms-64 button[type="submit"]:hover {
  background: #f5f3ee;
  border-color: #f5f3ee;
  color: var(--ye-ink);
}

#wpforms-64 .wpforms-confirmation-container-full {
  background: rgba(245, 243, 238, 0.06);
  border-color: var(--ye-accent-light);
  color: #f5f3ee;
}

#wpforms-64 .wpforms-error { color: #e2a08f; }

/* --- 6. WPForms: contact form on the light ground ----------------------- */

#wpforms-62 .wpforms-field-label { color: var(--ye-muted); }
#wpforms-62 input,
#wpforms-62 textarea { color: var(--ye-ink); }

/* --- 7. Before / after comparison --------------------------------------- */

.elementor-widget-xpro-before-after .xpro-compare-wrapper {
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(17, 17, 17, 0.16);
  cursor: ew-resize;
}

.elementor-widget-xpro-before-after .xpro-compare-wrapper img {
  border-radius: 0;
  object-fit: cover;
}

/* Labels: small, wide-tracked, square, matching the static build. */
.elementor-widget-xpro-before-after .xpro-compare-before-label,
.elementor-widget-xpro-before-after .xpro-compare-after-label {
  padding: 9px 18px;
  border-radius: 0;
  font-family: Inter, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.2;
}

.elementor-widget-xpro-before-after .xpro-compare-before-label {
  background: rgba(17, 17, 17, 0.82);
  color: #ffffff;
}

.elementor-widget-xpro-before-after .xpro-compare-after-label {
  background: var(--ye-accent);
  color: #ffffff;
}

/* Divider and circular knob. */
.elementor-widget-xpro-before-after .xpro-compare-overlay {
  border-color: rgba(255, 255, 255, 0.95);
}

.elementor-widget-xpro-before-after .xpro-compare-wrapper > span,
.elementor-widget-xpro-before-after .xpro-compare-handle {
  width: 56px;
  height: 56px;
  background: var(--ye-bg);
  border: 1px solid var(--ye-line);
  border-radius: 50%;
  box-shadow: 0 18px 48px rgba(17, 17, 17, 0.18);
}

@media (max-width: 1024px) {
  .elementor-widget-xpro-before-after .xpro-compare-wrapper > span,
  .elementor-widget-xpro-before-after .xpro-compare-handle {
    width: 46px;
    height: 46px;
  }
  .elementor-widget-xpro-before-after .xpro-compare-before-label,
  .elementor-widget-xpro-before-after .xpro-compare-after-label {
    padding: 7px 13px;
    font-size: 9px;
    letter-spacing: 0.18em;
  }
}

/* --- 8. Section rhythm on small screens --------------------------------- */

@media (max-width: 767px) {
  .elementor .e-con-boxed > .e-con-inner { padding-left: 0; padding-right: 0; }

  .elementor-widget-heading .elementor-heading-title { overflow-wrap: break-word; }

  /* Counters and stat bands read better stacked two-up than squeezed four-up. */
  .elementor-widget-counter .elementor-counter-number-wrapper { font-size: 34px !important; }
}

@media (max-width: 479px) {
  .elementor-widget-button .elementor-button { width: 100%; text-align: center; }
  .ye-filters { padding: 20px; }
  .ye-filters__actions { flex-wrap: wrap; }
  .ye-filters__count { margin-left: 0; width: 100%; }
}

/* Nothing may exceed the viewport at any width. */
.elementor, .elementor .e-con, .elementor .e-con-inner { max-width: 100%; }
img, iframe, video { max-width: 100%; }
