html:has(.street-dialog[open]) { overflow: hidden; }
body dialog.street-dialog:not([open]) { display: none !important; }
body dialog.street-dialog[open] {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(36rem, calc(100% - 2rem));
  max-height: 90vh;
  max-height: 90dvh;
  margin: auto !important;
  padding: clamp(1rem, 4vw, 1.75rem);
  overflow: auto;
  border: 1px solid #acc5df;
  border-radius: 14px;
  background: #fff;
  color: #0b2342;
}
.street-dialog::backdrop { background: #0b2342a6; }
.street-dialog h2 { margin: 0 3rem 1rem 0; font-size: clamp(1.35rem, 4vw, 1.7rem); }
.street-dialog label { display: block; margin-bottom: .4rem; font-weight: 700; }
.street-dialog :is(input,select) { box-sizing: border-box; width: 100%; min-height: 44px; font-size: 1rem; }
.street-dialog button { min-height: 44px; padding: .5rem; cursor: pointer; }
.street-dialog__close { position: absolute; top: .65rem; right: .65rem; min-width: 44px; }
.street-dialog .street-entry__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: .75rem; }
.street-dialog .street-entry__actions button { flex: 1 1 10rem; }
.street-dialog #street-entry-status { font-size: .9375rem; }
body dialog.street-dialog[open] {
  border-radius: 1.25rem;
  background: linear-gradient(155deg, #eaf4ff, #fff 44%);
  box-shadow: 0 24px 90px #04142c55;
}
body dialog.street-dialog .street-entry__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.street-dialog .street-entry__actions [data-street-action] {
  border: 1px solid #a2bddd;
  border-radius: .75rem;
  background: #fff;
  color: #0b2342;
  padding: .65rem;
  white-space: normal;
  font-weight: 700; font-size: .9375rem; line-height: 1.35;
}
.street-dialog .street-entry__actions [data-street-action="quartiere"] {
  background: #0b2342;
  color: #fff;
}
.street-dialog .street-entry__actions :is([data-street-action="servizi"],button[value="servizi"]) { grid-column: 1 / -1; }
.street-dialog__matches { display: grid; gap: .4rem; }
.street-dialog__matches button {
  border: 1px solid #b7cee6;
  border-radius: .65rem;
  background: #f0f7ff;
  color: #0b2342;
  text-align: left;
}
@media (max-width: 420px) {
  body dialog.street-dialog .street-entry__actions { grid-template-columns: minmax(0, 1fr); }
}

html.street-dialog-open { overflow: hidden; }
.street-dialog::backdrop { backdrop-filter: blur(5px); }
.street-dialog .street-dialog__close {
  display: grid;
  place-items: center;
  border: 1px solid #a2bddd;
  border-radius: 50%;
  background: #f0f7ff;
  color: #0b2342;
}
.street-dialog input {
  padding: .65rem .8rem;
  border: 1px solid #7899bc;
  border-radius: .75rem;
  background: #fff;
  color: #0b2342;
}
.street-dialog :is(input, button):focus-visible { outline: 2px solid #0756c5; outline-offset: 2px; }
.street-dialog .street-entry__actions [data-street-action="valutazione"] {
  background: #102e60;
  color: #fff;
}
.street-dialog .street-entry__actions [data-street-action="valutazione"]:hover { background: #10565d; }
.street-dialog .street-entry__actions [data-street-action="quartiere"] { background: #fff; color: #102e60; }
.street-dialog .street-entry__actions [data-street-action="quartiere"]:hover { background: #edf5ff; }
.street-dialog .street-entry__actions button[value="servizi"] {
  background: transparent;
  border: 0;
  color: #0756c5;
  text-decoration: underline;
  font-weight: 700;
}
.street-dialog #street-entry-status:empty { display: none; }
@media (max-width: 600px) {
  body dialog.street-dialog[open] {
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    border-radius: 1.25rem 1.25rem 0 0;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  .street-dialog::before {
    content: "";
    display: block;
    width: 2.25rem;
    height: .25rem;
    margin: 0 auto .75rem;
    border-radius: 1rem;
    background: #7899bc;
  }
}
