/* Estimate drawer */
.estimate-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(35rem, 100%);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  color: #183c36;
  background: #fbfaf5;
  box-shadow: -1rem 0 5rem #132c2338;
  font: 400 1rem/1.5 var(--sans, Arial, sans-serif);
}
.estimate-drawer:not([open]) { display: none; }
.estimate-drawer::backdrop { background: #0d2521a9; }
html:has(.estimate-drawer[open]) { overflow: hidden; }
.estimate-shell {
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  padding: max(1.75rem, env(safe-area-inset-top)) clamp(1.15rem, 4vw, 2.75rem) max(1.6rem, env(safe-area-inset-bottom));
  border-top: .28rem solid #446c5e;
}
.estimate-top, .estimate-team, .estimate-actions, .estimate-alternatives {
  display: flex;
  align-items: center;
}
.estimate-top { justify-content: space-between; gap: .5rem; margin-bottom: clamp(1.65rem, 4vh, 3.5rem); }
.estimate-team { gap: .7rem; }
.estimate-team img { border-radius: 50%; width: 2.9rem; height: 2.9rem; object-fit: cover; object-position: center 25%; }
.estimate-team strong, .estimate-team span { display: block; }
.estimate-team strong { font-size: .94rem; font-weight: 650; }
.estimate-team span { color: #52655a; font-size: .78rem; }
.estimate-close {
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; flex: none;
  color: #24453d; background: transparent; border: 1px solid #b9c9bd; border-radius: 50%;
}
.estimate-close:hover, .estimate-copy:hover { background: #e9eee6; }
.estimate-close .icon { width: 1.08rem; height: 1.08rem; }
.estimate-drawer h2 {
  font: 400 clamp(3rem, 5vw, 4.7rem)/.98 var(--serif, Georgia, serif);
  letter-spacing: -.045em; margin: 0 0 .85rem;
}
.estimate-drawer h2 em { color: #457362; font-weight: 400; }
.estimate-drawer h2:focus { outline: none; }
.estimate-drawer #estimate-intro { color: #53675a; margin: 0 0 1.45rem; font-size: 1rem; max-width: 27rem; }
.estimate-fields { display: grid; grid-template-columns: minmax(0,1.14fr) minmax(0,1fr); gap: .75rem; }
.estimate-field > label, .estimate-preview > label {
  display: block; font-size: .9rem; font-weight: 620; margin-bottom: .38rem;
}
.estimate-field label span { font-weight: 400; color: #53675a; }
.estimate-field select, .estimate-field textarea {
  box-sizing: border-box; width: 100%; border: 1px solid #aebeb1; border-radius: 5px;
  color: #193e34; background-color: #fffefb; padding: .65rem .75rem; min-height: 2.8rem;
  font: 400 1rem/1.5 var(--sans, Arial, sans-serif);
}
.estimate-field select {
  appearance: none; padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23345347' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: .72rem .5rem; background-position: right .75rem center;
}
.estimate-field :is(textarea,select):focus-visible, .estimate-preview textarea:focus-visible {
  outline: 2px solid #37705c; outline-offset: 2px;
}
.estimate-notes { margin: .95rem 0 1.2rem; }
.estimate-notes textarea { display: block; resize: vertical; }
.estimate-notes textarea::placeholder { color: #657569; }
.estimate-preview { background: #e7eee6; padding: .95rem 1.05rem; border-radius: 5px; }
.estimate-preview > label { display: flex; align-items: center; gap: .48rem; margin: 0 0 .4rem; }
.estimate-preview .icon { width: 1rem; height: 1rem; }
.estimate-preview textarea {
  display: block; box-sizing: border-box; width: 100%; max-height: 9rem; min-height: 3.1rem;
  padding: 0; margin: 0; resize: none; border: 0; background: transparent; color: #28483c;
  font: 400 1rem/1.55 var(--sans, Arial, sans-serif);
}
.estimate-actions { gap: .65rem; margin-top: 1.15rem; }
.estimate-primary, .estimate-copy {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .65rem .95rem;
  border-radius: 5px; text-align: center; font: 600 1rem/1.35 var(--sans, Arial, sans-serif);
}
.estimate-primary { flex: 1; background: #164e48; color: white; border: 1px solid #164e48; }
.estimate-primary:hover { background: #103e38; }
.estimate-copy { background: transparent; color: #21483c; border: 1px solid #aebeb1; }
.estimate-feedback { color: #315a4b; font-size: .87rem; margin: .45rem 0 0; }
.estimate-feedback:empty { margin: 0; }
.estimate-alternatives { flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid #cbd6ca; }
.estimate-alternatives a { color: #2f5042; font-size: .88rem; text-underline-offset: 4px; text-decoration: underline; }
.estimate-alternatives a:hover { text-decoration-thickness: 2px; }
.quote-form {display:grid;gap:.9rem;margin-top:1rem}
.quote-form[hidden] {display:none}
.quote-form label {display:grid;gap:.3rem;font-weight:600}
.quote-form input,.quote-form select,.quote-form textarea {box-sizing:border-box;width:100%;min-width:0;padding:.7rem;border:1px solid #92a597;border-radius:4px;background:#fffefa;color:var(--ink);font:inherit}
.quote-form p {margin:0}
.quote-form .btn {justify-self:start}
.quote-trap {position:absolute;inline-size:1px;block-size:1px;overflow:hidden;clip-path:inset(50%)}
@media (max-width: 430px) {
  .estimate-shell { padding-top: max(1.05rem, env(safe-area-inset-top)); }
  .estimate-top { margin-bottom: 1.5rem; }
  .estimate-fields { grid-template-columns: 1fr; gap: .75rem; }
  .estimate-alternatives { margin-top: 1.1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .estimate-drawer[open] { animation: estimate-enter .28s cubic-bezier(.2,.8,.25,1); }
  .estimate-drawer[open]::backdrop { animation: estimate-shade .2s ease-out; }
  @keyframes estimate-enter { from { transform: translateX(2rem); opacity: .45; } to { transform: none; opacity: 1; } }
  @keyframes estimate-shade { from { background-color: transparent; } }
}
