/* Стили для карт emap приложения */

.map-container {
    position: relative;
    overflow: hidden;
}

.map-container.loading::after {
    content: 'Загрузка карты...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

/* Адаптивность */
@media (max-width: 768px) {
    .map-container {
        height: 300px !important;
    }
}

/* Стили для ошибок карт */
.map-error {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #6c757d;
}

/* Стили для карточек адресов */
.address-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 20px;
}

.address-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.address-header h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    line-height: 1.4;
}

.coordinates p {
    margin: 10px 0;
    font-family: monospace;
    color: #666;
    font-size: 14px;
}

.address-meta p {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.address-actions {
    margin-top: 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .six.columns {
        width: 100% !important;
    }
}

/* Стили для формы создания/редактирования адреса */
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.map-section {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
}

.map-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.map-controls input {
    flex: 1;
    max-width: 300px;
}

.map-controls button {
    margin-right: 0;
}

.coordinates-info {
    font-family: monospace;
    background: #e9ecef !important;
    border: 1px solid #dee2e6;
}

#map {
    width: 100%;
    height: 500px;
    border: 2px solid #007cba;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

button {
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-actions {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

input[type="text"] {
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* Стили для отображения адреса над картой */
.address-display {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.address-display:hover {
    background: #e9ecef !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.address-title {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-text {
    margin: 0;
    font-size: 16px;
    color: #555;
    line-height: 1.4;
    word-break: break-word;
    hyphens: auto;
}

/* Динамические размеры карты */
.map-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Прячем стандартные подписи Leaflet/OSM
.leaflet-control-attribution,
.leaflet-container .leaflet-control-container .leaflet-control-attribution {
    display: none !important;
}*/

.map-container[data-width][data-height] {
    width: attr(data-width);
    height: attr(data-height);
}

/* Стандартные стили для кнопок */
button {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

button:hover {
    background: #0056b3;
}

button:last-child {
    margin-right: 0;
}

/* Стили для кнопки удаления */
button[onclick*="deleteAddress"] {
    background: #dc3545;
}

button[onclick*="deleteAddress"]:hover {
    background: #c82333;
}

/* Стили для заголовка страницы */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Стили для уведомлений */
.alert {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Стили для пустого состояния */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Стили для заголовка адреса */
.address-header {
    margin-bottom: 15px;
}

.address-header h3 {
    margin: 0;
    color: #333;
}
