.bg-leads-dialog:not([open]) { display: none; }
.bg-leads-dialog[open] {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(33rem, calc(100% - 1.5rem));
    max-width: none;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    color-scheme: dark;
    color: var(--paper, #f7f4ef);
    background: linear-gradient(140deg, #292522 0%, #171615 52%);
    border: 1px solid var(--line, #655749);
    border-radius: .75rem;
    box-shadow: 0 1.5rem 5rem #0008;
    font: 400 1rem/1.45 var(--sans, system-ui, sans-serif);
}
.bg-leads-dialog::backdrop { background: rgb(0 0 0 / 72%); }
.bg-leads-dialog-inner { padding: clamp(1.25rem, 4vw, 2.25rem); }
.bg-leads-dialog-heading { display: flex; align-items: flex-start; gap: .75rem; justify-content: space-between; margin-bottom: 1.25rem; }
.bg-leads-dialog h2 { color: inherit; margin: .1em 0 0; font: 400 clamp(2rem, 5vw, 2.75rem)/1.05 var(--serif, Georgia, serif); }
.bg-leads-close {
    flex: none; display: grid; place-content: center; min-height: 44px; min-width: 44px; padding: 0;
    background: transparent; border: 1px solid var(--line, #655749); border-radius: 50%; color: inherit;
    font: 400 1.45rem/1 system-ui, sans-serif; cursor: pointer;
}
.bg-leads-close:hover { background: #ffffff14; }
.bg-leads-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem .9rem; }
.bg-leads-wide { grid-column: 1 / -1; }
.bg-leads-fields label { display: block; margin: 0; color: inherit; font-size: .88rem; font-weight: 500; }
.bg-leads-fields small { font-weight: 400; font-size: inherit; color: #c5bdb4; }
.bg-leads-fields input, .bg-leads-fields textarea {
    box-sizing: border-box; display: block; width: 100%; min-height: 44px; min-width: 0; padding: .65rem .75rem; margin: .35rem 0 0;
    font: 400 1rem/1.45 var(--sans, system-ui, sans-serif); color: #faf6f0;
    background: #11100f; border: 1px solid #796e63; border-radius: .3rem;
}
.bg-leads-fields textarea { resize: vertical; }
.bg-leads-dialog :where(input, textarea, button, a):focus-visible {
    outline: 2px solid var(--light-gold, #efccaa); outline-offset: 3px;
}
.bg-leads-dialog .bg-leads-notice, .bg-leads-dialog .bg-leads-privacy { color: #d6cec6; font-size: .81rem; line-height: 1.5; }
.bg-leads-dialog .bg-leads-notice { margin: 1rem 0 .2rem; }
.bg-leads-dialog .bg-leads-privacy, .bg-leads-status a { text-decoration: underline; text-underline-offset: .2em; color: inherit; }
.bg-leads-send {
    display: flex; justify-content: space-between; align-items: center; width: 100%; margin: 1rem 0 0;
    min-height: 48px; padding: .7rem 1rem; border: 0; border-radius: .3rem; background: var(--gold, #e9c8a6);
    color: #13100c; font: 650 .95rem/1.35 var(--sans, system-ui, sans-serif); cursor: pointer;
}
.bg-leads-send:hover { background: var(--light-gold, #f3dcc5); }
.bg-leads-send:disabled { opacity: .75; cursor: progress; }
.bg-leads-dialog .bg-leads-status, form .bg-leads-status { margin: .65rem 0 0; font-size: .85rem; line-height: 1.45; }
.bg-leads-status:empty { display: none; }
form .bg-leads-trap {
    position: absolute !important; display: block; width: 1px; height: 1px; margin: -1px; padding: 0;
    clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0;
}
@media (max-width: 440px) {
    .bg-leads-fields { grid-template-columns: 1fr; gap: .65rem; }
    .bg-leads-dialog-inner { padding: 1.15rem; }
    .bg-leads-dialog-heading { margin-bottom: .9rem; }
}
