/* === Mega Geolocation === */

/* Selector "Cambiar de país" en banner */
#_desktop_select-address .select-address {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}
#_desktop_select-address .select-address-dest {
    font-weight: 600;
}

/* Banderitas SVG 4:3 */
.megageolocation-flag {
    width: 22px;
    height: 17px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 10px;
    vertical-align: middle;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* === Modal primera visita: "¿Desde dónde nos visitas?" === */
#megageolocation-first-modal .modal-content {
    border: none;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}
#megageolocation-first-modal .modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 22px 24px;
}
#megageolocation-first-modal .modal-body {
    padding: 28px 32px;
}
#megageolocation-first-modal .modal-footer {
    border-top: none;
    justify-content: center;
    padding-top: 0;
}
#megageolocation-first-modal .modal-title {
    font-weight: 400;
    font-size: 22px;
}

/* Dropdown custom (no select2) */
.megageolocation-dropdown {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}
.megageolocation-dropdown__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
}
.megageolocation-dropdown__toggle:hover,
.megageolocation-dropdown__toggle:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}
.megageolocation-dropdown__current {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
}
.megageolocation-dropdown__arrow {
    color: #6c757d;
    font-size: 12px;
    transform: translateY(-1px);
}
.megageolocation-dropdown__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 2000;
    max-height: 360px;
    display: flex;
    flex-direction: column;
}
.megageolocation-dropdown__search {
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
}
.megageolocation-dropdown__search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}
.megageolocation-dropdown__list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    max-height: 300px;
}
.megageolocation-dropdown__item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #232323;
    background: #fff;
}
.megageolocation-dropdown__item:hover,
.megageolocation-dropdown__item:focus {
    background: #f0f7ff;
    color: #232323;
}
.megageolocation-dropdown__item[hidden] {
    display: none !important;
}
.megageolocation-dropdown__item .megageolocation-flag[data-broken="1"] {
    display: none;
}
.megageolocation-dropdown__current .megageolocation-dropdown__label {
    color: #232323;
}

/* Botón confirmar */
#megageolocation-first-modal .modal-footer .btn-primary {
    padding: 9px 34px;
    font-weight: 700;
    line-height: 1.4;
    background: #000;
    border-color: #000;
    color: #fff;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
#megageolocation-first-modal .modal-footer .btn-primary:hover,
#megageolocation-first-modal .modal-footer .btn-primary:focus {
    background: #222;
    border-color: #222;
    color: #fff;
}
#megageolocation-first-modal .modal-footer .btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Fallback si no hay Bootstrap JS (queda visible centrado) */
.modal.megageolocation-first.show {
    background: rgba(0, 0, 0, 0.5);
}
