/* Layout Wrappers */
.country_cities_mod_main_wrapper {
    display: flex;
    gap: 15px;
}
.country_cities_mod_main_wrapper.desktop-horizontal {
    flex-direction: row;
    align-items: center;
}
.country_cities_mod_main_wrapper.desktop-vertical {
    flex-direction: column;
    align-items: flex-start;
}
.country_cities_mod_contacts {
    display: flex;
    gap: 15px;
}
.country_cities_mod_main_wrapper.desktop-horizontal .country_cities_mod_contacts {
    flex-direction: row;
    width: auto;
    right: 0;
    position: static;
}
.country_cities_mod_main_wrapper.desktop-vertical .country_cities_mod_contacts {
    flex-direction: column;
    gap: 5px;
}

/* Tablet Layout */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .country_cities_mod_main_wrapper.tablet-horizontal {
        flex-direction: row;
        align-items: center;
    }
    .country_cities_mod_main_wrapper.tablet-vertical {
        flex-direction: column;
        align-items: flex-start;
    }
    .country_cities_mod_main_wrapper.tablet-horizontal .country_cities_mod_contacts {
        flex-direction: row;
        width: auto;
        right: 0;
        position: static;
    }
    .country_cities_mod_main_wrapper.tablet-vertical .country_cities_mod_contacts {
        flex-direction: column;
        gap: 5px;
    }
}

/* Mobile Layout */
@media screen and (max-width: 767px) {
    .country_cities_mod_main_wrapper.mobile-horizontal {
        flex-direction: row;
        align-items: center;
    }
    .country_cities_mod_main_wrapper.mobile-vertical {
        flex-direction: column;
        align-items: flex-start;
    }
    .country_cities_mod_main_wrapper.mobile-horizontal .country_cities_mod_contacts {
        flex-direction: row;
    }
    .country_cities_mod_main_wrapper.mobile-vertical .country_cities_mod_contacts {
        flex-direction: column;
        gap: 5px;
    }
	.country_cities_mod_main_wrapper.desktop-horizontal .country_cities_mod_contacts,
	.country_cities_mod_main_wrapper.tablet-horizontal .country_cities_mod_contacts {
	    width: 100%;
	    right: 0;
    }
}

/* cities & minibox */
.country_cities_mod_top_geo {
    position: relative;
    width: auto;
}
.country_cities_mod_minibox {
    width: 260px;
}

.country_cities_mod_top_geo .country_cities_mod_down {
    color: #64748b;
    cursor: pointer;
    font-size: 75%;
    vertical-align: middle;
    line-height: 1;
    margin-left: 4px;
    transition: color 0.2s;
}
.country_cities_mod_top_geo:hover .country_cities_mod_down {
    color: #0c2340;
}

.country_cities_mod_top_geo > a {
    font-size: 100%;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.country_cities_mod_top_geo > a:hover {
    color: #0c2340;
}

.country_cities_mod_minibox {
    position: absolute;
    z-index: 555;
    left: 0;
    background: #ffffff;
    top: 35px;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 20px;
    border-radius: 12px;
    margin: 0.5em 0;
    box-shadow: 0 10px 25px rgba(12, 35, 64, 0.08);
}

.country_cities_mod_minibox::before {
    content: "";
    display: block;
    position: absolute;
    border: solid #e2e8f0;
    border-width: 1px 0 0 1px;
    transform: rotate(45deg);
    width: 12px;
    height: 12px;
    left: 20px;
    top: -7px;
    background: #ffffff;
}

.country_cities_mod_mb_1 {
    font-weight: 700;
    padding-left: 0;
    margin-bottom: 8px;
    color: #0c2340;
    font-size: 18px;
	text-align: center;
	text-transform: uppercase;
}

.country_cities_mod_mb_2 {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    gap: 10px;
}

.country_cities_mod_mb_3 {
    padding-left: 0;
    margin-top: 12px;
    font-size: 15px;
	justify-content: center;
    display: flex;
}

.country_cities_mod_mb_3 a {
    padding-left: 5px;
    color: #64748b !important;
    text-decoration: none;
    border-bottom: 1px dashed #cbd5e1;
    transition: all 0.2s;
}

.country_cities_mod_mb_3 a:hover {
    color: #0c2340;
    border-bottom-color: #0c2340;
}

.country_cities_mod_mb_21, .country_cities_mod_mb_22 {
    flex: 1;
    border: 1px solid #0c2340;
    cursor: pointer;
    padding: 10px 5px;
    font-size: 0.9em;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.country_cities_mod_mb_21 {
    background: #0c2340;
    color: #ffffff;
}

.country_cities_mod_mb_21:hover {
    background: #1a365d;
    border-color: #1a365d;
}

.country_cities_mod_mb_22 {
    background: #ffffff;
    color: #0c2340;
}

.country_cities_mod_mb_22:hover {
    background: #f8fafc;
}

/* Helper class */
.country_cities_mod_hidden {
    display: none !important;
}

/* cities & bigbox */
.country_cities_mod_bigbox {
    position: fixed;
    width: 766px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    padding: 3em;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(12, 35, 64, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.country_cities_mod_bigbox.active {
    opacity: 1;
    visibility: visible;
}

.country_cities_mod_bigbox.search-active {
    background: rgba(255, 255, 255, 0.98);
}

.country_cities_mod_bigbox.search-active .country_cities_mod_bigboxvars {
    display: none;
}

.country_cities_mod_bigbox .country_cities_mod_bclose {
    color: #94a3b8;
    cursor: pointer;
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 32px;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}

.country_cities_mod_bigbox .country_cities_mod_bclose:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.country_cities_mod_bigboxatr a {
    position: absolute;
    bottom: 20px;
    right: 40px;
    font-size: 75%;
    color: #cbd5e1;
}

.country_cities_mod_cityoverlay {
    width: 100%;
    height: 100%;
    background: rgba(12, 35, 64, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.country_cities_mod_cityoverlay.active {
    opacity: 1;
    visibility: visible;
}

.country_cities_mod_bigboxtitle {
    font-weight: 700;
    padding: 0 0 5px 0;
    font-size: 1.1em;
    color: #64748b;
}

.country_cities_mod_bigboxcity {
    font-size: 1.8em;
    font-weight: 800;
    padding: 0 0 10px 0;
    color: #0c2340;
}

.country_cities_mod_bigboxdesk {
    padding: 0;
    color: #475569;
    font-size: 0.95em;
}

.country_cities_mod_bigbox h3 {
    padding: 12px 15px;
    margin: 25px 0 15px 0;
    background: #f8fafc;
    border-left: 4px solid #0c2340;
    border-radius: 0 6px 6px 0;
    color: #0c2340;
    font-size: 1.1em;
    font-weight: 700;
}

.country_cities_mod_bigboxinput {
    padding: 0;
    margin: 20px 0;
    position: relative;
}

.country_cities_mod_bigboxinput i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    color: #94a3b8;
}

.country_cities_mod_bigboxinput input {
    border: 1px solid #cbd5e1;
    width: 100%;
    padding: 14px 20px;
    font-size: 1em;
    box-sizing: border-box;
    border-radius: 8px;
    background: #f8fafc;
    color: #0c2340;
    transition: all 0.3s ease;
}

.country_cities_mod_bigboxinput input:focus {
    border-color: #0c2340;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(12, 35, 64, 0.1);
}

.country_cities_mod_bigboxvars {
    margin: 15px 0;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
}

.country_cities_mod_bigboxchooserbox {
    margin: 0;
    position: relative;
    z-index: 2;
}

.country_cities_mod_bigboxchooser {
    padding: 10px;
    border: 1px solid #e2e8f0;
    position: absolute;
    width: 100%;
    background: #ffffff;
    top: -15px;
    box-sizing: border-box;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(12, 35, 64, 0.08);
}

.country_cities_mod_bigboxchooser a {
    display: block;
    color: #334155;
    padding: 10px 15px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}

.country_cities_mod_bigboxchooser a:hover {
    background: #f1f5f9;
    color: #0c2340;
}

/* Grid Layout for lists */
.country_cities_mod_bb_countries_list,
.country_cities_mod_bb_cities_list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.country_cities_mod_bb_countries_list a,
.country_cities_mod_bb_cities_list a:not(.country_cities_mod_bb_back_btn) {
    display: block;
    width: 100%;
    padding: 10px 15px;
    font-weight: 600;
    color: #334155;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    border: 1px solid transparent;
}

.country_cities_mod_bb_countries_list a:hover,
.country_cities_mod_bb_cities_list a:not(.country_cities_mod_bb_back_btn):hover {
    background: #f8fafc;
    color: #0c2340;
    border-color: #e2e8f0;
}

.country_cities_mod_bb_back_wrapper {
    grid-column: 1 / -1;
    margin-bottom: 20px;
    padding-left: 5px;
}

.country_cities_mod_bb_back_btn {
    color: #64748b;
    font-weight: 600;
    font-size: 0.9em;
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.country_cities_mod_bb_back_btn:hover {
    color: #0c2340;
}

@media screen and (max-width: 767px) {
    .country_cities_mod_bigbox {
        margin-left: 0;
        padding: 2em 1.5em;
        box-sizing: border-box;
		z-index: 1000000;
    }
    
    .country_cities_mod_bb_countries_list,
    .country_cities_mod_bb_cities_list {
        grid-template-columns: 1fr;
    }
}

/* Extracted Classes */
.country_cities_mod_mb_geo_info {
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.4;
    color: #475569;
	text-align: center;
}

.country_cities_mod_map_container {
    margin-top: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.country_cities_mod_map_iframe {
    width: 100%;
    height: 280px;
    border: 0;
    display: block;
}

/* ADMIN STYLES FOR CITYAJAX FIELD (Unified and Cleaned) */
.country_cities_mod_admin_cityajax_wrap {
    position: relative;
    border: 1px solid #cbd5e1;
    padding: 10px;
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border-radius: 6px;
    box-sizing: border-box;
}

.country_cities_mod_admin_cityajax_search_wrap {
    margin-bottom: 10px;
}

.country_cities_mod_admin_cityajax_search {
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
}

.country_cities_mod_admin_cityajax_search:focus {
    border-color: #0c2340;
    outline: none;
}

.country_cities_mod_admin_cityajax_select {
    width: 100%;
    height: 180px;
    border: 1px solid #cbd5e1;
    outline: none;
    margin-bottom: 10px;
    border-radius: 4px;
    padding: 5px;
}

.country_cities_mod_admin_cityajax_dropdown {
    position: absolute;
    background: #fff;
    border: 1px solid #cbd5e1;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.country_cities_mod_admin_cityajax_dropdown.active {
    display: block;
}

.cityajax-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
}

.cityajax-dropdown-item:hover {
    background: #f1f5f9;
}

.country_cities_mod_admin_cityajax_selected {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cityajax-item-block {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    gap: 10px;
}

.cityajax-item-name {
    flex-grow: 1;
    font-weight: 600;
    color: #1e293b;
}

.cityajax-item-alias {
    width: 120px;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
}

.cityajax-item-alias:focus {
    border-color: #0c2340;
    outline: none;
}

.cityajax-item-del {
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s;
}

.cityajax-item-del:hover {
    transform: scale(1.2);
}

.country_cities_mod_admin_cityajax_hint {
    font-size: 0.85em;
    color: #64748b;
    margin-top: 8px;
}

.country_cities_mod_admin_cityajax_btn_wrap {
    margin-bottom: 10px;
}

.country_cities_mod_admin_cityajax_btn_wrap button {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.95em;
    cursor: pointer;
    background: #0c2340;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.country_cities_mod_admin_cityajax_btn_wrap button:hover {
    background: #1a365d;
}