/**
 * RoomUpItalia Template Builder — asset privato migrato.
 * Modificare questo file per le aree private; il percorso storico
 * resta disponibile solo per aree non migrate che lo usano ancora.
 */

/*
 * Componente geografico condiviso RoomUpItalia.
 * Le regole sono limitate alla mappa e agli stati aggiuntivi per non alterare
 * il layout esistente dei moduli pubblico, utente e proprietario.
 */

.roomup-location__status {
    display: block;
    margin-top: 0.45rem;
}

.roomup-location__map-toggle {
    align-items: center;
    align-self: flex-start;
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 0.7rem;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    gap: 0.45rem;
    justify-content: center;
    margin-top: 0.65rem;
    min-height: 2.65rem;
    padding: 0.55rem 0.8rem;
}

.roomup-location__map-toggle img,
.roomup-location__map-heading button img {
    filter: brightness(0);
    height: 1.15rem;
    width: 1.15rem;
}

.roomup-location__map-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.roomup-location__map-panel {
    border: 1px solid var(--border-color, #d8dee8);
    grid-column: 1 / -1;
    border-radius: 0.9rem;
    margin-top: 0.25rem;
    overflow: hidden;
    padding: 0.75rem;
}

.roomup-location__map-heading {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}

.roomup-location__map-heading strong,
.roomup-location__map-heading small {
    display: block;
}

.roomup-location__map-heading small {
    margin-top: 0.2rem;
}

.roomup-location__map-heading button {
    align-items: center;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    min-height: 2.5rem;
    min-width: 2.5rem;
    padding: 0.45rem;
}

.roomup-location__map-canvas {
    border-radius: 0.7rem;
    height: min(55vh, 25rem);
    min-height: 18rem;
    overflow: hidden;
    width: 100%;
}

.roomup-location__map-message {
    margin: 0.65rem 0 0;
}

[data-roomup-location][aria-busy="true"] select,
[data-roomup-location][aria-busy="true"] [data-roomup-location-zone-options] {
    opacity: 0.72;
}

@media (max-width: 640px) {
    .roomup-location__map-toggle {
        width: 100%;
    }

    .roomup-location__map-canvas {
        height: 21rem;
        min-height: 16rem;
    }
}

.roomup-location__poi-fieldset {
    min-width: 0;
}

.roomup-location__poi-intro {
    margin: 0 0 0.75rem;
}

.roomup-location__poi-options {
    max-height: 19rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.roomup-location__poi-options .rui-choice-chip {
    min-width: 0;
}

.roomup-location__poi-options .rui-choice-chip span {
    align-items: center;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .roomup-location__poi-options {
        max-height: 16rem;
    }
}

.roomup-location__custom-summary {
    align-items: center;
    background: var(--surface-muted, #f5f7fa);
    border: 1px solid var(--border-color, #d8dee8);
    border-radius: 0.75rem;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding: 0.7rem 0.8rem;
}

.roomup-location__custom-summary[hidden] {
    display: none;
}

.roomup-location__custom-summary strong,
.roomup-location__custom-summary small {
    display: block;
}

.roomup-location__custom-summary small {
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
}

.roomup-location__custom-summary button {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 2.5rem;
    padding: 0.35rem 0.45rem;
    text-decoration: underline;
}

.roomup-location__custom-label {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.roomup-location__custom-label > span {
    font-weight: 700;
}

.roomup-location__custom-label input {
    box-sizing: border-box;
    min-height: 2.75rem;
    width: 100%;
}

@media (max-width: 640px) {
    .roomup-location__custom-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .roomup-location__custom-summary button {
        align-self: flex-start;
    }
}

.roomup-location__place-search {
    border-bottom: 1px solid var(--border-color, #d8dee8);
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
}

.roomup-location__place-search > label,
.roomup-location__place-search > label > span {
    display: block;
}

.roomup-location__place-search > label > span {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.roomup-location__place-search-control {
    display: flex;
    gap: 0.5rem;
}

.roomup-location__place-search-control input {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 2.8rem;
    min-width: 0;
}

.roomup-location__place-search-control button {
    align-items: center;
    background: #111;
    border: 1px solid #111;
    border-radius: 0.65rem;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-weight: 700;
    gap: 0.4rem;
    justify-content: center;
    min-height: 2.8rem;
    padding: 0.55rem 0.85rem;
}

.roomup-location__place-search-control button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.roomup-location__place-search-control button img {
    filter: brightness(0) invert(1);
    height: 1rem;
    width: 1rem;
}

.roomup-location__place-search > small,
.roomup-location__place-status {
    display: block;
    margin: 0.4rem 0 0;
}

.roomup-location__place-results {
    border: 1px solid var(--border-color, #d8dee8);
    border-radius: 0.7rem;
    display: grid;
    gap: 0;
    margin-top: 0.6rem;
    max-height: 21rem;
    overflow-y: auto;
}

.roomup-location__place-results[hidden] {
    display: none;
}

.roomup-location__place-result {
    align-items: center;
    background: var(--surface, #fff);
    border-bottom: 1px solid var(--border-color, #d8dee8);
    color: inherit;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: 2.1rem minmax(0, 1fr) auto;
    padding: 0.7rem 0.8rem;
    width: 100%;
}

.roomup-location__place-result:last-child {
    border-bottom: 0;
}

.roomup-location__place-result.is-active {
    box-shadow: inset 0 0 0 2px #111;
}

.roomup-location__place-result.is-selected {
    background: var(--surface-muted, #f5f7fa);
}

.roomup-location__place-result-number {
    align-items: center;
    background: #fff;
    border: 2px solid #111;
    border-radius: 50%;
    color: #111;
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 800;
    height: 2rem;
    justify-content: center;
    line-height: 1;
    width: 2rem;
}

.roomup-location__place-result.is-selected .roomup-location__place-result-number {
    background: #111;
    color: #fff;
}

.roomup-location__place-result-content,
.roomup-location__place-result-content strong,
.roomup-location__place-result-content small {
    display: block;
    min-width: 0;
}

.roomup-location__place-result-content small {
    margin-top: 0.2rem;
    overflow-wrap: anywhere;
}

.roomup-location__place-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.roomup-location__place-result-actions button {
    background: transparent;
    border: 1px solid #111;
    border-radius: 0.55rem;
    color: #111;
    cursor: pointer;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    min-height: 2.35rem;
    padding: 0.4rem 0.65rem;
}

.roomup-location__place-result-actions button:last-child {
    background: #111;
    color: #fff;
}

.roomup-location__place-result-actions button:hover,
.roomup-location__place-result-actions button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.roomup-location__place-result-actions button:disabled {
    cursor: default;
    opacity: 0.72;
}

.roomup-location__map-result-popup {
    display: grid;
    gap: 0.3rem;
    min-width: min(16rem, 70vw);
}

.roomup-location__map-result-popup strong,
.roomup-location__map-result-popup span,
.roomup-location__map-result-popup small {
    display: block;
}

.roomup-location__map-result-popup small {
    overflow-wrap: anywhere;
}

.roomup-location__popup-select {
    background: #111;
    border: 1px solid #111;
    border-radius: 0.5rem;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    margin-top: 0.35rem;
    min-height: 2.4rem;
    padding: 0.45rem 0.7rem;
    width: 100%;
}

.roomup-location__popup-select:hover,
.roomup-location__popup-select:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.roomup-location__leaflet-icon {
    background: transparent;
    border: 0;
}

.roomup-location__map-marker {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    justify-content: center;
    position: relative;
}

.roomup-location__map-marker--official,
.roomup-location__map-marker--selected {
    background: #111;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 2px 7px rgb(0 0 0 / 35%);
    height: 34px;
    transform: rotate(-45deg);
    width: 34px;
}

.roomup-location__map-marker--official svg,
.roomup-location__map-marker--selected svg {
    fill: #fff;
    height: 19px;
    transform: rotate(45deg);
    width: 19px;
}

.roomup-location__map-marker--selected {
    height: 38px;
    width: 38px;
}

.roomup-location__map-marker--selected svg {
    height: 23px;
    width: 23px;
}

.roomup-location__map-marker--search {
    background: #fff;
    border: 3px solid #111;
    border-radius: 50%;
    box-shadow: 0 2px 7px rgb(0 0 0 / 35%);
    color: #111;
    font-size: 0.9rem;
    font-weight: 900;
    height: 34px;
    line-height: 1;
    width: 34px;
}

.roomup-location__map-legend {
    background: rgb(255 255 255 / 94%);
    border: 1px solid #111;
    border-radius: 0.55rem;
    box-shadow: 0 1px 5px rgb(0 0 0 / 20%);
    color: #111;
    display: grid;
    font-size: 0.75rem;
    gap: 0.3rem;
    line-height: 1.25;
    padding: 0.5rem 0.6rem;
}

.roomup-location__map-legend strong,
.roomup-location__map-legend span {
    display: flex;
}

.roomup-location__map-legend strong {
    margin-bottom: 0.05rem;
}

.roomup-location__map-legend span {
    align-items: center;
    gap: 0.4rem;
}

.roomup-location__legend-symbol {
    align-items: center;
    box-sizing: border-box;
    display: inline-flex;
    flex: 0 0 1.25rem;
    font-style: normal;
    font-weight: 900;
    height: 1.25rem;
    justify-content: center;
    width: 1.25rem;
}

.roomup-location__legend-symbol--official {
    background: #111;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 0 0 1px #111;
    transform: rotate(-45deg);
}

.roomup-location__legend-symbol--search {
    background: #fff;
    border: 2px solid #111;
    border-radius: 50%;
    color: #111;
}

.roomup-location__legend-symbol--selected {
    background: #111;
    border-radius: 50%;
}

.roomup-location__legend-symbol--selected svg {
    fill: #fff;
    height: 1rem;
    width: 1rem;
}

@media (max-width: 640px) {
    .roomup-location__place-search-control {
        align-items: stretch;
        flex-direction: column;
    }

    .roomup-location__place-search-control button {
        width: 100%;
    }

    .roomup-location__place-result {
        align-items: start;
        grid-template-columns: 2.1rem minmax(0, 1fr);
    }

    .roomup-location__place-result-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .roomup-location__place-result-actions button {
        flex: 1 1 9rem;
    }

    .roomup-location__map-legend {
        font-size: 0.7rem;
        max-width: 12rem;
    }
}

/*
 * RoomUpItalia v25.18.123
 * Riordino grafico dei filtri geografici nella ricerca annunci.
 * La logica resta invariata: vengono modificati soltanto disposizione,
 * spaziature e resa responsive del componente pubblico.
 */
.ru-search__advanced-grid {
    align-items: start;
}

.ru-search__advanced-grid .ru-search__field {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.ru-search__advanced-grid .ru-search__field > select,
.roomup-location__poi-control {
    width: 100%;
}

.ru-search__advanced-grid .ru-search__field > small,
.ru-search__field--poi > small {
    display: block;
    margin-top: 0.4rem;
    color: #64748b;
    font-size: 0.75rem;
    line-height: 1.45;
}

.roomup-location__poi-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.75rem;
    gap: 0.5rem;
    align-items: stretch;
}

.roomup-location__poi-control select {
    min-width: 0;
}

.roomup-location__map-toggle--compact {
    align-self: stretch;
    width: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.5rem;
    margin: 0;
    padding: 0;
    border-color: #cbd5e1;
    border-radius: 0.7rem;
    background: #ffffff;
    color: #0f172a;
}

.roomup-location__map-toggle--compact:hover,
.roomup-location__map-toggle--compact:focus-visible {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
    outline: 3px solid rgba(37, 99, 235, 0.14);
}

.roomup-location__map-toggle--compact:disabled {
    border-color: #dbe2ea;
    background: #f8fafc;
    color: #94a3b8;
    opacity: 1;
}

.roomup-location__map-toggle--compact img {
    width: 1.1rem;
    height: 1.1rem;
}

.roomup-location__map-toggle--compact .roomup-location__map-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ru-search__checks {
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

.ru-search__checks legend {
    margin-bottom: 0.15rem;
}

@media (min-width: 1180px) {
    .ru-search__advanced-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.9rem 1rem;
    }

    .ru-search__field--poi {
        grid-column: span 2;
    }
}

@media (min-width: 900px) and (max-width: 1179px) {
    .ru-search__advanced-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .ru-search__field--poi {
        grid-column: span 2;
    }
}

@media (min-width: 641px) and (max-width: 899px) {
    .ru-search__advanced-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .ru-search__field--poi {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .ru-search__advanced-grid {
        gap: 0.85rem;
    }

    .roomup-location__poi-control {
        grid-template-columns: 1fr;
    }

    .roomup-location__map-toggle--compact {
        width: 100%;
        min-height: 2.85rem;
        padding: 0.55rem 0.85rem;
    }

    .roomup-location__map-toggle--compact .roomup-location__map-toggle-text {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    .ru-search__checks {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ru-search__check {
        width: 100%;
        box-sizing: border-box;
    }
}
