/* Yandex Map Plugin Styles */

/* Скрытие поля местоположения */
#billing_yandex_location_field {
    display: none;
}

/* Блок цены доставки */
.yandex-map-delivery-price {
    margin-top: 15px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
}

.yandex-map-delivery-price.free-shipping {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.yandex-map-delivery-price .free-shipping-text {
    color: #155724;
    font-weight: bold;
}

.yandex-map-delivery-price .delivery-price-value {
    color: #0073aa;
    font-weight: bold;
}

.yandex-map-delivery-price small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.yandex-map-delivery-price.delivery-unavailable {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.yandex-map-min-order-notice {
    margin-top: 10px;
    padding: 8px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-size: 12px;
    color: #856404;
}

/* Плашка на странице checkout */
.yandex-map-delivery-price-checkout {
    margin-top: 30px;
    width: 100%;
}

.yandex-map-delivery-info-row {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

.yandex-map-delivery-info-row .yandex-map-delivery-price-checkout .yandex-map-delivery-price {
    margin-top: 0;
}
.yandex-map-delivery-info-row {
    clear: both;
    margin-top: 30px;
}
/* Кнопка открытия карты */
.yandex-map-button {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.yandex-map-button:hover {
    color: #fff !important;
}

.yandex-map-button:focus {
}

/* Модальное окно */
.yandex-map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

/* Overlay */
.yandex-map-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* Контейнер карты */
#yandex-map-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    min-width: 600px;
    width: 80%;
    max-width: 900px;
    height: 500px;
    background-color: #fff;
    border-radius: 8px;
    overflow: visible;
}

/* Индикатор местоположения на карте */
#yandex-map-container:before {
    background-image: url("../images/loc_icon.png");
    background-size: 100%;
    background-repeat: no-repeat;
    width: 50px;
    height: 50px;
    position: absolute;
    left: 50%;
    top: 50%;
    content: '';
    transform: translate(-50%, -50%);
    z-index: 99999;
    pointer-events: none;
}

/* Кнопка подтверждения */
#yandex-map-confirm {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    padding: 12px 24px;
    background-color: #46b450;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#yandex-map-confirm:hover {
    background-color: #3a9543;
    transform: translateX(-50%) translateY(-2px);
}

#yandex-map-confirm:active {
    transform: translateX(-50%) translateY(0);
}

#yandex-map-confirm:focus {
    outline: 2px solid #46b450;
    outline-offset: 2px;
}

/* Индикатор загрузки */
.yandex-map-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: none;
    text-align: center;
    min-width: 200px;
}

.yandex-map-loading span {
    display: block;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.yandex-map-loading:after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: yandex-map-spin 1s linear infinite;
}

@keyframes yandex-map-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    #yandex-map-container {
        min-width: 100%;
        width: 100%;
        height: 100%;
        border-radius: 0;
        top: 0;
        left: 0;
        transform: none;
    }
    
    #yandex-map-confirm {
        bottom: 20px;
        width: calc(100% - 40px);
        max-width: 300px;
    }
    
    .yandex-map-loading {
        width: calc(100% - 40px);
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    #yandex-map-confirm {
        bottom: 15px;
        font-size: 14px;
        padding: 10px 20px;
    }
    
    .yandex-map-button {
        width: 100%;
        margin-top: 10px;
    }
}