/*
This is corection styles and hawe to be removed in future.
*/
.tooltip:before {
    background-color: var(--tooltip-color);
    border-radius: 0.25rem;
    color: #FFF;
    font-size: .875rem;
    line-height: 1.25rem;
    max-width: 20rem;
    padding: 0.25rem 0.5rem;
    width: -moz-max-content;
    width: max-content;
}

.menu li>:not(ul,.menu-title,details,.btn).active, .menu li>:not(ul,.menu-title,details,.btn):active, .menu li>details>summary:active {
    --tw-bg-opacity: 1;
    --tw-text-opacity: 1;
    background-color: #e60014;
    color: #FFF;
}

#map {
    filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 3.5+ */
    -webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
}

 .menu.menu-horizontal li > a.text-primary,
    .menu.menu-horizontal li > label.text-primary,
    .menu.menu-horizontal li > a[aria-current="page"] {
        background-color: transparent !important;
        color: #e60014 !important;
        font-weight: 600;
    }
    
    .menu.menu-horizontal li > a:focus,
    .menu.menu-horizontal li > a:hover,
    .menu.menu-horizontal li > label:focus,
    .menu.menu-horizontal li > label:hover {
        background-color: transparent !important;
    }
    
    .menu.menu-horizontal li > label[for="my-drawer-3"] {
        background-color: transparent !important;
    }
    
    .menu.menu-horizontal li > label[for="my-drawer-3"]:focus,
    .menu.menu-horizontal li > label[for="my-drawer-3"]:hover {
        background-color: transparent !important;
    }
    
    .menu.menu-horizontal a,
    .menu.menu-horizontal label {
        transition: color 200ms ease-in-out;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .menu.menu-horizontal a:hover,
    .menu.menu-horizontal label:hover {
        color: #e60014 !important;
    }
    
    .menu.menu-horizontal a.text-primary:hover,
    .menu.menu-horizontal label.text-primary:hover,
    .menu.menu-horizontal a[aria-current="page"]:hover {
        color: #e60014 !important;
    }
    
    /* Стили для иконки в кнопке Каталога */
    .menu.menu-horizontal label i[data-feather] {
        width: 16px;
        height: 16px;
    }
    
    /* Плавные анимации для выпадающих меню */
    [x-cloak] { display: none !important; }

.flickity-prev-next-button.previous {
    left: 55px;
}

.flickity-prev-next-button.next {
    right: 55px;
}
/* City Manager Button */
.city-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.city-header-btn:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.city-header-btn__icon {
    flex-shrink: 0;
}

.city-header-btn__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.city-header-btn__arrow {
    flex-shrink: 0;
    margin-left: auto;
}

@media (max-width: 768px) {
    .city-header-btn__text {
        max-width: 100px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .city-header-btn {
        background: rgba(90, 111, 216, 0.15);
        border-color: rgba(90, 111, 216, 0.3);
        color: #a3b1f0;
    }
    
    .city-header-btn:hover {
        background: rgba(90, 111, 216, 0.2);
        border-color: rgba(90, 111, 216, 0.4);
        box-shadow: 0 4px 12px rgba(90, 111, 216, 0.2);
    }
}
/* City Manager Popup */
.city-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.city-popup__overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: cityOverlayFadeIn 0.3s ease;
}

@keyframes cityOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.city-popup__container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: cityContainerSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cityContainerSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.city-popup__header {
    padding: 30px 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.city-popup__title {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
}

.city-popup__subtitle {
    margin: 0;
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.4;
}

.city-popup__content {
    flex: 1;
    overflow-y: auto;
    padding: 25px 30px;
}

.city-popup__search-wrapper {
    margin-bottom: 25px;
}

.city-popup__search {
    position: relative;
}

.city-popup__search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #f8f9fa;
}

.city-popup__search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.city-popup__search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.city-popup__cities {
    margin-bottom: 25px;
}

.city-popup__section-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.city-popup__popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.city-popup__city-card {
    display: block;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
}

.city-popup__city-card:hover {
    transform: translateY(-2px);
    border-color: #667eea;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.city-popup__city-card--active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.city-popup__city-card--active:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

.city-popup__card-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.city-popup__card-name {
    font-weight: 600;
    font-size: 15px;
}

.city-popup__card-phone {
    font-size: 13px;
    opacity: 0.8;
}

.city-popup__city-card--active .city-popup__card-phone {
    opacity: 0.9;
}

.city-popup__card-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #4caf50;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
}

.city-popup__all-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.city-popup__city-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #495057;
    font-size: 15px;
    transition: all 0.2s ease;
    background: white;
}

.city-popup__city-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateX(3px);
}

.city-popup__city-item--active {
    background: #f0f4ff;
    border-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.city-popup__city-name {
    flex: 1;
}

.city-popup__city-phone {
    font-size: 13px;
    color: #666;
    margin-left: 10px;
}

.city-popup__city-item--active .city-popup__city-phone {
    color: #8898e8;
}

.city-popup__check-icon {
    margin-left: 10px;
    flex-shrink: 0;
}

.city-popup__current-city {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.city-popup__current-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.city-popup__current-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.city-popup__footer {
    display: flex;
    gap: 15px;
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.city-popup__close-btn {
    flex: 1;
    padding: 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.city-popup__close-btn:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #333;
}

.city-popup__confirm-btn {
    flex: 1;
    padding: 15px;
    background: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.city-popup__confirm-btn:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

.city-popup__close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    z-index: 1;
}

.city-popup__close-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.city-popup__empty {
    padding: 40px 0;
    text-align: center;
    color: #666;
}

/* Полосы прокрутки */
.city-popup__content::-webkit-scrollbar,
.city-popup__all-list::-webkit-scrollbar {
    width: 8px;
}

.city-popup__content::-webkit-scrollbar-track,
.city-popup__all-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.city-popup__content::-webkit-scrollbar-thumb,
.city-popup__all-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.city-popup__content::-webkit-scrollbar-thumb:hover,
.city-popup__all-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .city-popup__container {
        width: 95%;
        max-height: 95vh;
    }
    
    .city-popup__header {
        padding: 25px 20px 15px;
    }
    
    .city-popup__title {
        font-size: 24px;
    }
    
    .city-popup__content {
        padding: 20px;
    }
    
    .city-popup__popular-grid {
        grid-template-columns: 1fr;
    }
    
    .city-popup__all-list {
        grid-template-columns: 1fr;
        max-height: 250px;
    }
    
    .city-popup__footer {
        flex-direction: column;
        padding: 20px;
    }
    
    .city-popup__close-icon {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .city-popup__container {
        background: #1a1a1a;
        color: #fff;
    }
    
    .city-popup__header {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a47a2 100%);
    }
    
    .city-popup__search-input {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .city-popup__search-input:focus {
        border-color: #5a6fd8;
        background: #2a2a2a;
        box-shadow: 0 0 0 3px rgba(90, 111, 216, 0.2);
    }
    
    .city-popup__search-icon path {
        stroke: #888;
    }
    
    .city-popup__section-title {
        color: #fff;
    }
    
    .city-popup__city-card {
        background: #2a2a2a;
        border-color: #444;
        color: #ccc;
    }
    
    .city-popup__city-card:hover {
        background: #333;
        border-color: #5a6fd8;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    
    .city-popup__city-card--active {
        background: #5a6fd8;
        border-color: #5a6fd8;
        color: white;
    }
    
    .city-popup__city-item {
        background: #2a2a2a;
        border-color: #444;
        color: #ccc;
    }
    
    .city-popup__city-item:hover {
        background: #333;
        border-color: #5a6fd8;
    }
    
    .city-popup__city-item--active {
        background: rgba(90, 111, 216, 0.2);
        border-color: #5a6fd8;
        color: #a3b1f0;
    }
    
    .city-popup__city-phone {
        color: #888;
    }
    
    .city-popup__current-city {
        background: #2a2a2a;
    }
    
    .city-popup__current-label {
        color: #aaa;
    }
    
    .city-popup__current-name {
        color: #fff;
    }
    
    .city-popup__footer {
        background: #2a2a2a;
        border-top-color: #333;
    }
    
    .city-popup__close-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #ccc;
    }
    
    .city-popup__close-btn:hover {
        background: #333;
        border-color: #555;
        color: #fff;
    }
    
    .city-popup__confirm-btn {
        background: #5a6fd8;
        border-color: #5a6fd8;
    }
    
    .city-popup__confirm-btn:hover {
        background: #4a5fc8;
        border-color: #4a5fc8;
    }
}