/* Оверлей для затемнения фона */
.contacts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Выдвигающаяся панель контактов */
.contacts-panel {
    position: fixed;
    top: 0;
    right: -400px; /* Скрыта за правым краем экрана */
    width: 400px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.contacts-panel.active {
    right: 0; /* Выдвигается на экран */
}

/* Шапка панели */
.contacts-header {
    background-color: var(--main-gray-color);;
    color: white;
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.contacts-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.contacts-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.contacts-close:hover {
    background-color: #dc0000;
}

/* Контент панели с прокруткой */
.contacts-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #f8f9fa;
}

/* Блоки контактной информации */
.contact-block {
    margin-bottom: 12px;
    background-color: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-block h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.contact-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-label {
    font-weight: 500;
    color: #666;
    margin-right: 8px;
    min-width: 80px;
}

.contact-value {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-value:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Заглушка для карты */
.map-placeholder {
    height: 200px;
    background-color: #e9ecef;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #adb5bd;
}

.map-placeholder-text {
    color: #6c757d;
    font-style: italic;
}

/* Стили для прокрутки */
.contacts-content::-webkit-scrollbar {
    width: 6px;
}

.contacts-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.contacts-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.contacts-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .contacts-panel {
        width: 100%;
        right: -100%;
    }
    
    .contacts-content {
        padding: 15px;
    }
    
    .contact-block {
        padding: 12px;
    }
}
