#modalTrocarIdioma,
#modalSelecionarIdioma {
    --country-modal-width: 420px;
    --country-modal-max-height: min(680px, calc(100dvh - 48px));
}

html body #modalTrocarIdioma .modal-dialog,
html body #modalSelecionarIdioma .modal-dialog {
    width: min(var(--country-modal-width), calc(100vw - 32px)) !important;
    max-width: min(var(--country-modal-width), calc(100vw - 32px)) !important;
    height: auto !important;
    max-height: var(--country-modal-max-height) !important;
    margin: 24px auto !important;
    display: flex !important;
    align-items: center !important;
    transform: none !important;
}

html body #modalTrocarIdioma .modal-content,
html body #modalSelecionarIdioma .modal-content {
    width: 100% !important;
    height: auto !important;
    max-height: var(--country-modal-max-height) !important;
    overflow: hidden !important;
    border: 1px solid #404040 !important;
    border-radius: 16px !important;
    background: #171a22 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .62) !important;
}

html body #modalTrocarIdioma .idioma-currency-panel,
html body #modalSelecionarIdioma .idioma-currency-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    max-height: var(--country-modal-max-height) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 16px !important;
}

html body #modalTrocarIdioma .idioma-currency-header,
html body #modalSelecionarIdioma .idioma-currency-header {
    flex: 0 0 auto !important;
    padding: 20px 18px 16px !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

html body #modalTrocarIdioma .idioma-currency-header h2,
html body #modalSelecionarIdioma .idioma-currency-header h2 {
    font-size: 22px !important;
    line-height: 1.2 !important;
}

html body #modalTrocarIdioma .idioma-currency-close,
html body #modalSelecionarIdioma .idioma-currency-close {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.08) !important;
    font-size: 17px !important;
}

html body #modalTrocarIdioma .idioma-currency-list,
html body #modalSelecionarIdioma .idioma-currency-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 10px 12px 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
}

html body #modalTrocarIdioma .idioma-currency-option,
html body #modalSelecionarIdioma .idioma-currency-option {
    min-height: 56px !important;
    padding: 9px 10px !important;
    border-radius: 9px !important;
}

@media (max-width: 576px) {
    html body #modalTrocarIdioma,
    html body #modalSelecionarIdioma {
        --country-modal-max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
    }

    html body #modalTrocarIdioma.show,
    html body #modalSelecionarIdioma.show {
        position: fixed !important;
        inset: 0 !important;
        display: flex !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        align-items: center !important;
        justify-content: center !important;
        padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    html body #modalTrocarIdioma.show .modal-dialog,
    html body #modalSelecionarIdioma.show .modal-dialog {
        width: min(100%, var(--country-modal-width)) !important;
        max-width: var(--country-modal-width) !important;
        height: auto !important;
        max-height: var(--country-modal-max-height) !important;
        margin: auto !important;
        display: flex !important;
        align-items: center !important;
    }

    html body #modalTrocarIdioma.show .modal-content,
    html body #modalSelecionarIdioma.show .modal-content {
        height: auto !important;
        max-height: var(--country-modal-max-height) !important;
        border-radius: 16px !important;
    }

    html body #modalTrocarIdioma.show .idioma-currency-panel,
    html body #modalSelecionarIdioma.show .idioma-currency-panel {
        height: auto !important;
        max-height: var(--country-modal-max-height) !important;
    }

    html body #modalTrocarIdioma .idioma-currency-header,
    html body #modalSelecionarIdioma .idioma-currency-header {
        padding: 16px 14px 12px !important;
    }

    html body #modalTrocarIdioma .idioma-currency-header h2,
    html body #modalSelecionarIdioma .idioma-currency-header h2 {
        font-size: 20px !important;
    }

    html body #modalTrocarIdioma .idioma-currency-list,
    html body #modalSelecionarIdioma .idioma-currency-list {
        padding: 8px 10px 12px !important;
    }

    html body #modalTrocarIdioma .idioma-currency-option,
    html body #modalSelecionarIdioma .idioma-currency-option {
        min-height: 54px !important;
        padding: 8px !important;
    }

    html body #modalTrocarIdioma .idioma-currency-option strong,
    html body #modalSelecionarIdioma .idioma-currency-option strong {
        font-size: 15px !important;
    }

    html body #modalTrocarIdioma .idioma-currency-option small,
    html body #modalSelecionarIdioma .idioma-currency-option small {
        font-size: 12px !important;
    }
}
