/* ITH Assistant + estimate form */
:root {
  --ith-a-brand: #c28840;
  --ith-a-brand-dark: #9c6a2c;
  --ith-a-ink: #1f1a14;
  --ith-a-muted: #5f574d;
  --ith-a-line: #e6ddd0;
  --ith-a-bg: #ffffff;
  --ith-a-soft: #fbf6ee;
}

/* ---------- Floating assistant ---------- */
.ith-a { position: fixed; right: 20px; bottom: 20px; z-index: 99990; font-size: 15px; line-height: 1.45; color: var(--ith-a-ink); }
.ith-a__launcher {
  display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--ith-a-brand); color: #fff; font-weight: 700; font-size: 15px;
  padding: 12px 18px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.22);
}
.ith-a__launcher:hover { background: var(--ith-a-brand-dark); }
.ith-a__launcher:focus-visible, .ith-a button:focus-visible, .ith-a a:focus-visible, .ith-a input:focus-visible { outline: 3px solid #1f6feb; outline-offset: 2px; }
.ith-a[data-state="open"] .ith-a__launcher span { display: none; }
.ith-a__panel {
  position: absolute; right: 0; bottom: 64px; width: 360px; max-width: calc(100vw - 32px);
  max-height: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column;
  background: var(--ith-a-bg); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden;
}
.ith-a__panel[hidden] { display: none; }
.ith-a__head { display: flex; align-items: center; justify-content: space-between; background: var(--ith-a-ink); color: #fff; padding: 12px 14px; }
.ith-a__title { margin: 0; font-weight: 700; font-size: 15px; color: #fff; }
.ith-a__close { background: transparent; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
.ith-a__body { padding: 14px; overflow-y: auto; }
.ith-a__body p { margin: 0 0 10px; }
.ith-a__msg { background: var(--ith-a-soft); border-radius: 10px; padding: 10px 12px; }
.ith-a__small { font-size: 13px; color: var(--ith-a-muted); }
.ith-a__choices { display: grid; gap: 8px; margin: 10px 0; }
.ith-a-btn {
  display: block; width: 100%; text-align: left; cursor: pointer; text-decoration: none;
  background: #fff; color: var(--ith-a-ink); border: 1px solid var(--ith-a-line); border-radius: 10px;
  padding: 10px 12px; font-size: 15px; font-weight: 600;
}
.ith-a-btn:hover { border-color: var(--ith-a-brand); color: var(--ith-a-ink); }
.ith-a-btn--primary { background: var(--ith-a-brand); border-color: var(--ith-a-brand); color: #fff; text-align: center; }
.ith-a-btn--primary:hover { background: var(--ith-a-brand-dark); color: #fff; }
.ith-a__link { background: none; border: 0; color: var(--ith-a-brand-dark); cursor: pointer; padding: 6px 0; font-weight: 600; }
.ith-a__fs { border: 0; padding: 0; margin: 0 0 12px; }
.ith-a__fs legend { font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.ith-a__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ith-a-chip { border: 1px solid var(--ith-a-line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px; color: var(--ith-a-ink); }
.ith-a-chip[aria-pressed="true"] { background: var(--ith-a-ink); border-color: var(--ith-a-ink); color: #fff; }
.ith-a__custom { margin-top: 8px; font-size: 14px; }
.ith-a__custom input { width: 64px; padding: 4px 6px; }
.ith-a__result { border-top: 1px solid var(--ith-a-line); margin-top: 6px; padding-top: 10px; }
.ith-a__form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.ith-a__form input { display: block; width: 100%; padding: 8px 10px; border: 1px solid var(--ith-a-line); border-radius: 8px; font-size: 15px; margin-top: 3px; }

@media (max-width: 480px) {
  .ith-a { right: 12px; bottom: 12px; }
  .ith-a__panel { position: fixed; left: 8px; right: 8px; bottom: 76px; width: auto; max-width: none; }
}
@media print { .ith-a { display: none; } }

/* ---------- Page estimate form ---------- */
.ith-form { background: #fff; border: 1px solid var(--ith-a-line); border-radius: 12px; padding: 24px; max-width: 760px; margin: 24px auto; color: var(--ith-a-ink); text-align: left; }
.ith-form__title { margin: 0 0 6px; }
.ith-form__intro { color: var(--ith-a-muted); }
.ith-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ith-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.ith-form input, .ith-form select, .ith-form textarea { width: 100%; padding: 10px 12px; border: 1px solid #cfc4b4; border-radius: 8px; font-size: 16px; background: #fff; color: var(--ith-a-ink); }
.ith-form__note { font-size: 13px; color: var(--ith-a-muted); }
.ith-form .ith-a-btn--primary { width: auto; padding: 12px 28px; }
.ith-form__ok { background: #e8f5e9; color: #1b5e20; border-radius: 8px; padding: 10px 12px; }
.ith-form__err { background: #fdecea; color: #8a1c13; border-radius: 8px; padding: 10px 12px; }
.ith-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .ith-form { padding: 16px; } .ith-form__grid { grid-template-columns: 1fr; } }

/* Neutralize theme button styles (Astra uppercases + pads all buttons). */
.ith-a button, .ith-a .ith-a-btn, .ith-a .ith-a-chip, .ith-form .ith-a-btn {
  text-transform: none; letter-spacing: normal; font-family: inherit; line-height: 1.3; min-height: 0;
}
.ith-a .ith-a-chip { padding: 6px 12px; font-weight: 500; }
.ith-a .ith-a-btn { padding: 10px 12px; }
.ith-a .ith-a__close { padding: 0 4px; background: transparent; }
.ith-a .ith-a__link { padding: 6px 0; background: none; color: var(--ith-a-brand-dark); }
.ith-a a.ith-a-btn, .ith-a a.ith-a-btn:visited { color: var(--ith-a-ink); }
.ith-a a.ith-a-btn--primary, .ith-a a.ith-a-btn--primary:visited, .ith-a a.ith-a-btn--primary:hover { color: #fff; }
