/* Pristine instant estimator. Every selector is namespaced with estimate-. */

.estimate-root {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.estimate-root [hidden] {
  display: none !important;
}

.estimate-lead {
  font-size: 1.125em;
  font-weight: 600;
}

.estimate-form {
  display: grid;
  gap: 1rem;
  max-width: 32rem;
  margin: 1rem 0;
}

.estimate-field {
  display: grid;
  gap: 0.375rem;
}

.estimate-label {
  display: block;
  font-weight: 600;
}

.estimate-input,
.estimate-textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid currentColor;
  border-radius: 0.375rem;
  font: inherit;
  color: inherit;
  background: #fff;
}

.estimate-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
}

.estimate-input[aria-invalid="true"] {
  border-color: #b00020;
}

.estimate-hint,
.estimate-note {
  margin: 0;
  font-size: 0.9375em;
}

.estimate-error {
  margin: 0;
  color: #b00020;
  font-weight: 600;
}

.estimate-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.estimate-check input {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.125rem 0 0;
}

.estimate-button {
  display: inline-block;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 1.125rem;
  border: 2px solid #1a1a1a;
  border-radius: 0.375rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  color: #1a1a1a;
  background: #fff;
  cursor: pointer;
}

.estimate-button-primary {
  color: #fff;
  background: #1a1a1a;
}

.estimate-button-quiet {
  font-weight: 500;
}

.estimate-button:disabled,
.estimate-button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.estimate-button:hover:not(:disabled) {
  text-decoration: underline;
}

.estimate-root :is(a, button, input, textarea, h3):focus-visible {
  outline: 3px solid #0b57d0;
  outline-offset: 2px;
}

.estimate-panel,
.estimate-results,
.estimate-offer {
  box-sizing: border-box;
  max-width: 100%;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #8a8a8a;
  border-radius: 0.5rem;
}

.estimate-offer {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
  background: #f6f6f6;
}

.estimate-standard {
  margin: 0.25rem 0;
  font-size: 1.25em;
}

.estimate-list {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.estimate-details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 1rem 0;
}

.estimate-details dt {
  font-weight: 600;
}

.estimate-details dd {
  margin: 0;
}

.estimate-actions,
.estimate-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 0;
  list-style: none;
}

.estimate-actions li,
.estimate-tools li {
  max-width: 100%;
  margin: 0;
}

.estimate-actions li:first-child {
  flex-basis: 100%;
}

.estimate-table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.estimate-table th,
.estimate-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #8a8a8a;
  text-align: left;
}

.estimate-table caption {
  padding: 0.5rem 0;
  font-weight: 600;
  text-align: left;
}

.estimate-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.estimate-print-sheet {
  display: none;
}

@media (max-width: 30rem) {
  .estimate-button {
    width: 100%;
  }

  .estimate-details {
    grid-template-columns: 1fr;
  }

  .estimate-actions li,
  .estimate-tools li {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .estimate-root * {
    transition: none !important;
    animation: none !important;
  }
}

/* Print only the estimate, and only while the Print estimate button is in use.
   The estimate-printing class is set on the root element by estimator.mjs. */
@media print {
  html.estimate-printing body * {
    visibility: hidden;
  }

  html.estimate-printing .estimate-print-sheet,
  html.estimate-printing .estimate-print-sheet * {
    visibility: visible;
  }

  html.estimate-printing .estimate-print-sheet {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    color: #000;
    background: #fff;
    font: 12pt/1.5 Georgia, "Times New Roman", serif;
    white-space: pre-wrap;
  }
}

.estimate-root fieldset[data-estimate-js-required]{border:0;padding:0;margin:0;min-width:0;display:grid;gap:1rem}
