/**
 * Стили для Яндекс карт в checkout
 */

/* Стили для ссылки "Указать на карте" */
.map-link-wrapper {
    margin-top: 10px;
    margin-bottom: 15px;
}

.map-link-wrapper a {
    text-decoration: underline;
    color: #007bff;
    font-size: 14px;
    transition: color 0.3s ease;
}

.map-link-wrapper a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Стили для модального окна */
#yandexMapModal .modal-dialog {
    max-width: 900px;
}

#yandexMapModal .modal-content {
    border-radius: 8px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#yandexMapModal .modal-header {
    background: #f8f9fa;
    color: #333;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 15px;
    min-height: auto;
    display: flex;
    justify-content: flex-end;
}

#yandexMapModal .xoo-cp-close {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

#yandexMapModal .xoo-cp-close:hover {
    opacity: 1;
}

#yandexMapModal .modal-body {
    padding: 15px;
}

/* Стили для карты */
#yandex-map {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    width: 100%;
    height: 450px;
}

/* Стили для информационного блока */
#map-info {
    border-radius: 6px;
    border: none;
    font-size: 13px;
    padding: 10px 12px;
    margin: 10px 0 0 0;
}

#map-info.alert-info {
    background-color: #f8f9fa;
    color: #6c757d;
    border-left: 3px solid #007bff;
}

/* Стили для кнопок в футере */
#yandexMapModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
    min-height: auto;
}

#yandexMapModal .modal-footer .btn {
    margin: 0 5px;
}

/* Стили для уведомлений */
.woocommerce-checkout .alert {
    border-radius: 8px;
    border: none;
    margin-bottom: 20px;
    padding: 15px 20px;
    font-size: 14px;
}

.woocommerce-checkout .alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.woocommerce-checkout .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Адаптивность */
@media (max-width: 768px) {
    #yandexMapModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #yandexMapModal .modal-body {
        padding: 10px;
    }
    
    #yandex-map {
        height: 350px !important;
    }
    
    #yandexMapModal .modal-footer {
        padding: 10px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#yandexMapModal .modal-content {
    animation: fadeIn 0.2s ease-out;
}

/* Стили для загрузки */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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