/* Основные стили виджета в карточке */
.hadat-delivery-widget {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif !important;
    background: #fff;
    color: #1d1d1b;
    width: 600px;
    max-width: 100%;
}

.hadat-delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.hadat-delivery-city {
    font-size: 12px;
    color: #888;
}

.hadat-delivery-city-link {
    color: #ab9783; /* Фирменный цвет Hadat */
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.hadat-delivery-methods {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hadat-delivery-method {
    font-size: 12px;
}

.hadat-delivery-method-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.hadat-delivery-method-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 11px;
    color: #555;
}

.hadat-delivery-method-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.hadat-delivery-map-link {
    color: #ab9783;
    text-decoration: underline;
    cursor: pointer;
    font-size: 11px;
    margin-top: 3px;
    display: inline-block;
}

/* Модальные окна (общие стили) */
.hadat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    font-family: 'Montserrat', sans-serif !important;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.hadat-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hadat-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.hadat-modal-map {
    max-width: 900px;
    width: 95%;
    height: 80vh;
}

.hadat-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hadat-modal-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.hadat-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.hadat-modal-body {
    padding: 20px;
    overflow-y: auto;
}

/* Модалка выбора города */
.hadat-city-search {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 400;
    box-sizing: border-box;
}

.hadat-city-search:focus {
    outline: none;
    border-color: #ab9783;
}

.hadat-city-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hadat-city-results li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.hadat-city-results li:hover {
    background: #f9f9f9;
}

.hadat-city-name {
    font-weight: 600;
}
.hadat-city-region {
    font-size: 12px;
    color: #888;
}

/* Карта */
#hadat-map-container {
    width: 100%;
    height: 100%;
    min-height: 500px;
}
.hadat-modal-map .hadat-modal-body {
    padding: 0;
    height: calc(100% - 55px);
}

.hadat-map-filters {
    margin-left: auto;
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.hadat-map-filters select {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    outline: none;
    cursor: pointer;
}
.hadat-map-filters select:focus {
    border-color: #ab9783;
}

/* Лоадер */
.hadat-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(171, 151, 131, 0.3);
    border-radius: 50%;
    border-top-color: #ab9783;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Мобильная версия — ещё компактнее */
@media (max-width: 768px) {
    .hadat-delivery-widget {
        margin-top: 8px;
        padding: 7px 10px;
        border-radius: 5px;
    }

    .hadat-delivery-header {
        margin-bottom: 4px;
    }

    .hadat-delivery-city {
        font-size: 11px;
    }

    .hadat-delivery-city-link {
        font-size: 11px;
    }

    .hadat-delivery-methods {
        gap: 3px;
    }

    .hadat-delivery-method {
        font-size: 11px;
    }

    .hadat-delivery-method-title {
        margin-bottom: 1px;
        font-size: 11px;
    }

    .hadat-delivery-method-list {
        font-size: 10px;
    }

    .hadat-delivery-method-list li {
        margin-bottom: 1px;
    }

    .hadat-delivery-map-link {
        font-size: 10px;
        margin-top: 2px;
    }
}
