/* iRumah 60s qualification calculator — scoped so Elementor chrome is untouched. */
.irumah-qualify {
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --paper: #fffdfb;
  --cream: #f6f1ea;
  --tan: #A67C52;
  --tan-dark: #8b6642;
  --tan-soft: #f3ebe3;
  --tan-mid: #d4b896;
  --ok: #14532d;
  --err: #9f1239;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 32px rgba(28, 25, 23, 0.07);
  --shadow-soft: 0 2px 8px rgba(28, 25, 23, 0.04);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.15rem 1.1rem 6rem;
  box-sizing: border-box;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.irumah-qualify *,
.irumah-qualify *::before,
.irumah-qualify *::after { box-sizing: border-box; }

.irumah-qualify__intro {
  margin: 0 0 1.15rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

/* —— Progress —— */
.irumah-qualify__top {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  grid-template-areas:
    "back counter"
    "bar bar";
  gap: 0.45rem 0.6rem;
  align-items: center;
  margin-bottom: 1.15rem;
}
.irumah-back {
  grid-area: back;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.irumah-back:hover { background: var(--cream); border-color: var(--tan-mid); }
.irumah-back:active { transform: scale(0.96); }
.irumah-back[hidden] { visibility: hidden; pointer-events: none; }
.irumah-qualify__counter {
  grid-area: counter;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.irumah-qualify__bar {
  grid-area: bar;
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.irumah-qualify__bar-fill {
  display: block;
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, var(--tan) 0%, #c49a6c 100%);
  border-radius: 99px;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* —— Panels —— */
.irumah-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.15rem 1.4rem;
  box-shadow: var(--shadow);
}
.irumah-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.38rem;
  letter-spacing: -0.025em;
  line-height: 1.28;
  font-weight: 750;
}
.irumah-hint {
  margin: -0.35rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* —— Option cards —— */
.irumah-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.irumah-cards--stack { grid-template-columns: 1fr; }
.irumah-cards--multi { grid-template-columns: 1fr 1fr; }

.irumah-card-opt {
  display: block;
  cursor: pointer;
  margin: 0;
  position: relative;
  -webkit-user-select: none;
  user-select: none;
}
.irumah-card-opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.irumah-card-opt__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.4rem;
  min-height: 5.75rem;
  padding: 1.05rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}
.irumah-card-opt:active .irumah-card-opt__body {
  transform: scale(0.985);
}
.irumah-cards--stack .irumah-card-opt__body {
  min-height: 3.5rem;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.7rem;
  padding: 1rem 1.1rem;
}
.irumah-card-opt__icon {
  font-size: 1.55rem;
  line-height: 1;
}
.irumah-card-opt__label {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}
.irumah-card-opt__sub {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
}

/* Selected state — clear & premium */
.irumah-card-opt:has(input:checked) .irumah-card-opt__body,
.irumah-card-opt.is-on .irumah-card-opt__body {
  border-color: var(--tan);
  background: var(--tan-soft);
  box-shadow: 0 0 0 1.5px var(--tan), var(--shadow-soft);
}
.irumah-card-opt:has(input:checked) .irumah-card-opt__label,
.irumah-card-opt.is-on .irumah-card-opt__label {
  color: var(--tan-dark);
}
.irumah-card-opt:focus-within .irumah-card-opt__body {
  outline: 2px solid var(--tan);
  outline-offset: 2px;
}

/* —— Size steppers —— */
.irumah-sizes { margin-bottom: 0.25rem; }
.irumah-size {
  margin-bottom: 1.1rem;
  padding: 0.95rem 0.95rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}
.irumah-size:last-of-type { margin-bottom: 0.75rem; }
.irumah-size__title {
  margin: 0 0 0.55rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.irumah-size .irumah-size__title + .irumah-stepper + .irumah-unsure + .irumah-size__title {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--line);
}
.irumah-stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.irumah-stepper__btn {
  flex: 0 0 auto;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.irumah-stepper__btn:hover:not(:disabled) {
  background: var(--tan-soft);
  border-color: var(--tan);
  color: var(--tan-dark);
}
.irumah-stepper__btn:active:not(:disabled) { transform: scale(0.94); }
.irumah-stepper__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.irumah-stepper input {
  width: 4.75rem;
  text-align: center;
  padding: 0.6rem 0.35rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  font-size: 1.15rem;
  background: #fff;
  color: var(--ink);
  -moz-appearance: textfield;
}
.irumah-stepper input::-webkit-outer-spin-button,
.irumah-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.irumah-stepper input:focus {
  outline: 2px solid var(--tan);
  outline-offset: 1px;
  border-color: var(--tan);
}
.irumah-stepper input:disabled {
  background: var(--cream);
  color: var(--muted);
}
.irumah-stepper__unit {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 550;
}
.irumah-unsure {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  cursor: pointer;
  min-height: 1.75rem;
}
.irumah-unsure input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--tan);
}

/* —— Contact fields —— */
.irumah-field { display: block; margin: 0 0 0.95rem; }
.irumah-field span { display: block; font-weight: 650; margin-bottom: 0.35rem; font-size: 0.95rem; }
.irumah-field input[type="text"],
.irumah-field input[type="tel"] {
  width: 100%;
  padding: 0.88rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  min-height: 3rem;
  transition: border-color 0.15s ease;
}
.irumah-field input:focus {
  outline: 2px solid var(--tan);
  outline-offset: 1px;
  border-color: var(--tan);
}

.irumah-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0 0 0.5rem;
  background: #fff;
  cursor: pointer;
}
.irumah-check input {
  margin-top: 0.15rem;
  accent-color: var(--tan);
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}
.irumah-check--consent {
  border: 0;
  background: transparent;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}
.irumah-check--consent a {
  color: var(--tan-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.req { color: var(--tan); }
.irumah-err {
  color: var(--err);
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.7rem;
  background: #fff1f2;
  border-radius: 10px;
  border: 1px solid #fecdd3;
}
.irumah-err[hidden] { display: none !important; }

/* —— Buttons —— */
.irumah-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.65rem;
}
.irumah-nav--stack {
  flex-direction: column;
}
.irumah-nav--stack .irumah-btn { width: 100%; }

.irumah-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.35rem;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.irumah-btn--primary {
  background: #A67C52;
  color: #fff;
  box-shadow: 0 6px 18px rgba(166, 124, 82, 0.32);
}
.irumah-btn--primary:hover {
  background: var(--tan-dark);
  color: #fff;
  box-shadow: 0 8px 22px rgba(139, 102, 66, 0.38);
}
.irumah-btn--primary:active { transform: scale(0.985); }
.irumah-btn--ghost {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.irumah-btn--ghost:hover {
  border-color: var(--tan-mid);
  background: var(--cream);
  color: var(--ink);
}
.irumah-btn[disabled] { opacity: 0.55; cursor: wait; box-shadow: none; }

/* —— Result (premium, no HOT/WARM/COLD) —— */
.irumah-qualify__done {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.55rem 1.2rem 1.45rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.irumah-qualify__done::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tan), #c49a6c);
}
.irumah-result__eyebrow {
  margin: 0.15rem 0 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tan-dark);
  font-weight: 750;
}
.irumah-result__title {
  margin: 0 0 0.55rem;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
  font-weight: 750;
}
.irumah-result__body {
  margin: 0 0 1.15rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.98rem;
}
.irumah-result__estimate {
  background: linear-gradient(165deg, var(--tan-soft) 0%, #fff 70%);
  border: 1px solid #e8d9c8;
  border-radius: 14px;
  padding: 1.05rem 1.1rem;
  margin-bottom: 1rem;
}
.irumah-result__estimate-label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--tan-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.irumah-result__estimate-range {
  margin: 0 0 0.4rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.2;
}
.irumah-result__estimate-note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.irumah-qualify__ref {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  background: var(--cream);
  border-radius: 10px;
  display: inline-block;
}
.irumah-qualify__ref strong {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0.02em;
}

.irumah-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* —— Sticky CTA —— */
.irumah-sticky {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 40;
  border: 0;
  border-radius: 999px;
  background: #A67C52;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.95rem 1.25rem;
  min-height: 52px;
  box-shadow: 0 12px 28px rgba(166, 124, 82, 0.4);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.irumah-sticky:hover { background: var(--tan-dark); }
.irumah-sticky:active { transform: scale(0.985); }

@media (min-width: 720px) {
  .irumah-qualify {
    padding: 1.6rem 0 2.25rem;
    max-width: 32rem;
  }
  .irumah-panel {
    padding: 1.5rem 1.35rem 1.55rem;
  }
  .irumah-sticky { display: none !important; }
}

@media (max-width: 379px) {
  .irumah-qualify { padding: 0.95rem 0.85rem 5.75rem; }
  .irumah-cards { gap: 0.55rem; }
  .irumah-card-opt__body {
    min-height: 5.25rem;
    padding: 0.9rem 0.75rem;
  }
  .irumah-card-opt__label { font-size: 0.92rem; }
  .irumah-panel h2 { font-size: 1.25rem; }
}

/* Printable result for “Muat Turun PDF” placeholder */
@media print {
  body * { visibility: hidden !important; }
  .irumah-qualify,
  .irumah-qualify * { visibility: visible !important; }
  .irumah-qualify {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: none;
    box-shadow: none;
    padding: 0;
  }
  .irumah-sticky,
  .irumah-qualify__top,
  .irumah-qualify__form,
  .irumah-qualify__intro,
  .irumah-nav { display: none !important; }
  .irumah-qualify__done {
    display: block !important;
    border: 0;
    box-shadow: none;
  }
  .irumah-qualify__done::before { display: none; }
}

body.irumah-ttl-canvas {
  margin: 0;
  background: #f6f1ea;
}
