/* A compact estimate shortcut stays within reach after the main header leaves. */
.estimate-bar {
  position: fixed;
  z-index: 60;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: min(1100px, calc(100% - 40px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 5px 4px 18px;
  border: 1px solid #ffffff24;
  border-radius: 16px;
  background: rgba(0, 0, 0, .75);
  color: #f4f3ee;
  box-shadow: 0 5px 24px #00000020;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity .3s ease, transform .4s cubic-bezier(.22,.61,.36,1), visibility .3s;
}
.estimate-bar.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.estimate-bar-category { min-width: 0; }
.estimate-bar-accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.estimate-bar-words {
  display: grid;
  overflow: hidden;
  padding-block: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.5px;
}
.estimate-bar-words > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
}
.estimate-bar-words > .is-active { animation: estimate-category-in .35s ease-out both; }
.estimate-bar-words > .is-exiting { animation: estimate-category-out .35s ease-in both; }
.estimate-bar-cta {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 18px;
  border-radius: 11px;
  background: var(--gold, #d2b17b);
  color: #20251f;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  transition: background .2s ease;
}
/* Preserve a 44px touch target around the slimmer visible button. */
.estimate-bar-cta::before { content: ''; position: absolute; inset: -5px 0; }
.estimate-bar-cta:hover { background: #e0c493; }
.estimate-bar-cta:focus-visible { outline: 2px solid #f4f3ee; outline-offset: 3px; }
html.estimate-bar-active { scroll-padding-top: 84px; }
@keyframes estimate-category-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes estimate-category-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(6px); }
}
@media (max-width: 780px) {
  .estimate-bar {
    top: max(8px, env(safe-area-inset-top));
    width: calc(100% - 24px);
    gap: 8px;
    padding: 4px 4px 4px 12px;
    border-radius: 15px;
  }
  .estimate-bar-words { font-size: 15px; letter-spacing: -.3px; }
  .estimate-bar-cta { padding: 6px 14px; font-size: 13px; border-radius: 10px; }
  html.estimate-bar-active { scroll-padding-top: 76px; }
}
@media (max-width: 360px) {
  .estimate-bar-words { font-size: 14px; }
  .estimate-bar-cta { padding-inline: 12px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .estimate-bar { transition: none; }
  .estimate-bar-words > span { animation: none; transform: none; opacity: 0; }
  .estimate-bar-words > span.is-active,
  .estimate-bar-words > span.is-exiting { animation: none; transform: none; }
  .estimate-bar-words > span.is-active { opacity: 1; }
}
@media print { .estimate-bar { display: none; } }
