/* Modal base styles */
.hc-city-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}
.hc-city-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    opacity: 1;
}
.hc-city-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 90%;
}
.hc-city-modal-content h2 {
    margin-top: 0;
}
.hc-city-modal-content select {
    width: 100%;
    max-width: 300px;
    margin: 15px 0;
    padding: 6px;
}
.hc-city-modal-content button {
    cursor: pointer;
    padding: 8px 16px;
    border: none;
    border-radius: 3px;
    font-size: 1em;
}

.hc-city-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.hc-city-modal-buttons .hc-city-modal-option {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hc-city-modal-buttons .hc-city-modal-option:hover,
.hc-city-modal-buttons .hc-city-modal-option:focus {
    transform: translateY(-2px);
}

.hc-city-modal-buttons .hc-city-modal-option[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/*!* =========================================================*/
/*   Loader visível também no iOS/Safari*/
/*   ========================================================= *!*/
/*@keyframes hc-city-nudge {*/
/*    0%   { background-position: calc(100% - 1.20rem) center; }*/
/*    50%  { background-position: calc(100% - 1.19rem) center; } !* 1 px p/ forçar paint *!*/
/*    100% { background-position: calc(100% - 1.20rem) center; }*/
/*}*/

.hc-city-select.loading {
    padding-right: 1.3rem !important;
    background-image: url("../images/hc-loading.gif") !important;
    background-repeat: no-repeat !important;
    background-size: 1em 1em !important;
    background-position: calc(100% - 1.2rem) center !important;

    /* evita interação enquanto carrega */
    pointer-events: none;
    opacity: .7;
    transition: opacity .2s;

    /*!* ---------- NOVO: empurra 1 px p/ re-paint ---------- *!*/
    /*animation: hc-city-nudge 0.4s steps(1) infinite;*/
}

/* 3‒ BLOQUEIO DE SCROLL DA PÁGINA
      Só entra em ação enquanto o modal estiver VISÍVEL */
html:has(#hc-city-modal:not([style*="display:none"])) ,
body:has(#hc-city-modal:not([style*="display:none"])) {
    overflow: hidden;
    height: 100vh;                      /* evita overscroll em mobile */
}

/* 4‒ Se o script esconder o modal com visibility: hidden         */
html:has(#hc-city-modal[style*="visibility:hidden"]),
body:has(#hc-city-modal[style*="visibility:hidden"]) {
    overflow: auto;
    height: auto;
}