
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    background: #ffffff;
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 24px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-title {
    font-weight: 700;
    font-size: 18px;
    color: #333;
    margin: 0;
}
.modal-header .close {
    padding: 0;
    margin: 0;
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #666;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 1;
    float: none;
}
.modal-header .close:hover {
    background: #f0f5ff;
    color: #3b82f6;
    transform: rotate(90deg);
}
.modal-body {
    padding: 20px 24px;
}

.heightlistcity .input-group {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.heightlistcity .input-group:focus-within {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgb(59 130 246 / 33%);
}

.heightlistcity .input-group-append {
    display: flex;
    align-items: center;
    margin: 0;
}
.heightlistcity .btn-group-gray {
    border: none;
    background: #fff;
    color: #3b82f6;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 0;
    z-index: 5;
}
html[dir="rtl"] .heightlistcity .btn-group-gray {
    margin-left: 2px;
}
html[dir="ltr"] .heightlistcity .btn-group-gray {
    margin-right: 2px;
}
.heightlistcity {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}
.heightlistcity::-webkit-scrollbar {
    width: 6px;
}
.heightlistcity::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.heightlistcity::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.heightlistcity::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}
.citylistitems ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.citylistitems li {
    position: relative;
    padding: 0;
    background: #ffffff;
    border: 1px solid #eef0f2;
    border-radius: 10px;
    transition: all 0.2s ease;
    overflow: hidden;
}
.citylistitems li:has(input:checked) {
    border-color: #3b82f6;
    background: #f0f5ff;
    box-shadow: 0 4px 12px rgb(59 130 246 / 33%)
}
.citylistitems li.active {
    border-color: #3b82f6;
    background: #fff5f5;
}
.citylistitems li:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgb(59 130 246 / 33%);
}
.city-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 12px 14px;
    cursor: pointer;
    margin: 0;
    font-size: .9rem;
    color: #555;
    user-select: none;
}
.city-checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.custom-checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #f0f0f0;
    border-radius: 6px;
    border: 1px solid #d1d1d1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.custom-checkmark::after {
    content: "";
    position: absolute;
    display: none;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}
.city-checkbox-input:checked ~ .custom-checkmark {
    background-color: #3b82f6;
    border-color: #3b82f6;
}
.city-checkbox-input:checked ~ .custom-checkmark::after {
    display: block;
}
.city-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}
html[dir="rtl"] .city-name {
    text-align: right;
    padding-left: 8px;
}
html[dir="ltr"] .city-name {
    text-align: left;
    padding-right: 8px;
}
.city-checkbox-input:checked ~ .city-name {
    color: #3b82f6;
    font-weight: 600;
}
.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 16px 24px;
    display: flex;
    gap: 10px;
    background: #fdfdfd;
    justify-content: flex-end;
}
.modal-footer .btn {
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.enseraf_btn_city {
    background-color: #f1f3f5;
    color: #636e72;
    border: none;
}
.enseraf_btn_city:hover {
    background-color: #e9ecef;
    color: #2d3436;
}
.taed_btn_city {
    background-color: #3b82f6;
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgb(59 130 246 / 33%);
    flex-grow: 1;
}
.taed_btn_city:hover {
    background-color: #3b82f6;
    transform: translateY(-1px);
    color: white !important;
    box-shadow: 0 6px 20px rgb(59 130 246 / 33%);
}
@media (max-width: 576px) {
    body { padding: 10px; }
    .modal-dialog { margin: 0.5rem; }
    .modal-header, .modal-body, .modal-footer { padding: 15px; }
    .modal-title { font-size: 16px; }
    .heightlistcity { max-height: 55vh; }
    .citylistitems ul { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .citylistitems li { font-size: 12px; }
    .city-checkbox-label { padding: 10px 8px; }
    .modal-footer .btn { padding: 10px 15px; font-size: 13px; }
    .custom-checkmark { width: 18px; height: 18px; }
}
.modal.fade .modal-dialog {
    transform: translateY(40px) scale(0.98);
    opacity: 0;
    transition:
            transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
            opacity 200ms ease-out;
    will-change: transform, opacity;
}
.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.modal-backdrop.fade {
    opacity: 0;
    transition: opacity 200ms ease-out;
}
.modal-backdrop.show {
    opacity: 0.35;
}
.modal.fade .modal-dialog {
    margin-top: 0;
}