:root {
  --estimate-page-bg: #f7f1e8;
  --estimate-page-text: #0d2230;
  --estimate-page-header: rgba(255, 250, 241, 0.88);
}

html[data-theme="dark"] {
  --estimate-page-bg: #091821;
  --estimate-page-text: #fffaf1;
  --estimate-page-header: rgba(9, 24, 33, 0.9);
}

html,
body.estimate-page {
  min-height: 100%;
  background: var(--estimate-page-bg);
}

body.estimate-page {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  color: var(--estimate-page-text);
}

.estimate-page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(95, 113, 121, 0.18);
  background: var(--estimate-page-header);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.estimate-page-brand {
  width: 112px;
  flex: 0 0 auto;
}

.estimate-page-brand img {
  display: block;
  width: 100%;
  height: 62px;
  object-fit: contain;
}

.estimate-page-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.estimate-page-actions .button {
  min-height: 42px;
  white-space: nowrap;
}

.estimate-page .theme-toggle {
  color: var(--estimate-page-text);
}

.estimate-page-main {
  width: 100%;
  flex: 1 0 auto;
}

.estimate-page-shell.connect-drawer {
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  display: block;
  padding: clamp(1.25rem, 4vw, 3rem) max(1rem, env(safe-area-inset-right)) clamp(2rem, 6vw, 4rem) max(1rem, env(safe-area-inset-left));
  pointer-events: auto;
}

.estimate-page-panel.connect-panel {
  width: min(100%, 720px);
  max-height: none;
  margin: 0 auto;
  overflow: visible;
  border-radius: 24px;
  padding: clamp(1.25rem, 4vw, 2rem);
  transform: none;
  pointer-events: auto;
  box-shadow: 0 22px 70px rgba(9, 24, 33, 0.16);
}

.estimate-page-panel .estimate-form-heading {
  padding-right: 0;
}

.estimate-page-panel .estimate-form-heading h1 {
  margin: 0 0 0.45rem;
  color: #164a64;
  font-size: clamp(1.65rem, 5vw, 2.2rem);
}

.estimate-page-footer {
  padding: 0 1rem calc(1rem + env(safe-area-inset-bottom));
  color: color-mix(in srgb, var(--estimate-page-text) 68%, transparent);
  text-align: center;
  font-size: 0.82rem;
}

.estimate-page-footer p {
  margin: 0;
}

@media (max-width: 520px) {
  .estimate-page-header {
    min-height: 72px;
  }

  .estimate-page-brand {
    width: 90px;
  }

  .estimate-page-brand img {
    height: 52px;
  }

  .estimate-page-actions .button {
    min-height: 38px;
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
  }

  .estimate-page-panel.connect-panel {
    border-radius: 18px;
  }
}
