.bmg-lead-form {
  --bmg-form-border: #d6d9df;
  --bmg-form-focus: #b58a3a;
  color: #15191d;
}
.bmg-lead-form *, .bmg-callback-modal * { box-sizing: border-box; }
.bmg-form-extra summary { padding: 8px 0; font-size: .9rem; font-weight: 600; cursor: pointer; }
.bmg-form-extra > .bmg-form-grid { margin-top: 16px; }
.bmg-privacy-link { margin: -8px 0 14px; font-size: .8rem; }
.bmg-privacy-link a { color: #634811 !important; text-decoration: underline; }
.bmg-lead-form :focus-visible { outline: 3px solid #8b6929; outline-offset: 3px; }

.bmg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.bmg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bmg-field--full {
  grid-column: 1 / -1;
}

.bmg-field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.bmg-field input,
.bmg-field select,
.bmg-field textarea {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--bmg-form-border);
  border-radius: 8px;
  background: #fff;
  color: #15191d;
  font: inherit;
}

.bmg-field textarea {
  min-height: 110px;
  resize: vertical;
}

.bmg-field input:focus,
.bmg-field select:focus,
.bmg-field textarea:focus {
  border-color: var(--bmg-form-focus);
  outline: 3px solid rgb(181 138 58 / 20%);
  outline-offset: 1px;
}

.bmg-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 18px 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.bmg-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.bmg-lead-submit {
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 8px;
  background: #b58a3a;
  color: #111417;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.bmg-lead-submit:hover {
  background: #cba454;
}

.bmg-lead-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.bmg-form-status {
  min-height: 1.5em;
  margin: 12px 0 0;
  font-weight: 700;
}

.bmg-form-status.is-success { color: #137a37; }
.bmg-form-status.is-error { color: #b42318; }

.bmg-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.bmg-lead-form--compact .bmg-form-grid {
  grid-template-columns: 1fr;
}

.bmg-lead-form--compact .bmg-lead-submit {
  width: 100%;
  background: #c9252c;
  color: #fff;
}

.bmg-lead-form--compact .bmg-consent {
  margin: 13px 0;
  font-size: 0.78rem;
}

.bmg-callback-modal[hidden] {
  display: none;
}

.bmg-callback-modal {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  width: min(370px, calc(100% - 24px));
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.bmg-callback-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgb(181 138 58 / 48%);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 50px rgb(0 0 0 / 20%);
  animation: bmg-modal-in 220ms ease-out both;
}

.bmg-callback-modal__dialog h2 {
  margin: 6px 0 10px;
  color: #111417;
  font-size: 1.5rem;
  padding-right: 30px;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.bmg-callback-modal__dialog > p:not(.bmg-callback-modal__eyebrow):not(.bmg-callback-modal__alternate) {
  margin: 0 0 14px;
  color: #555e67;
  font-size: .87rem;
}

.bmg-callback-modal__eyebrow {
  margin: 0 32px 8px 0;
  color: #8b6929;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.bmg-callback-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f1f3f5;
  color: #242b32;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.bmg-callback-modal__alternate {
  margin: 16px 0 0;
  color: #5b6269;
  font-size: 0.88rem;
  text-align: center;
}

.bmg-callback-modal__alternate a {
  color: #b42318;
  font-weight: 800;
}

@keyframes bmg-modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .bmg-form-grid { grid-template-columns: 1fr; }

  .bmg-callback-modal {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .bmg-callback-modal__dialog {
    width: 100%;
    max-height: min(56dvh, 400px);
    overflow-y: auto;
    padding: 18px;
    border-radius: 16px;
  }

  .bmg-callback-modal__alternate { display: none; }
  .bmg-callback-modal .bmg-consent { font-size: .8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bmg-callback-modal__dialog { animation: none; }
}
