/* Chromax Mobile Contacts Styles v5.0 */

.chromax-mobile-contacts {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
    opacity: 1;
    visibility: visible;
}

/* Стиль 1 - Вертикальный список */
.chromax-mobile-contacts.style1 {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chromax-mobile-contacts.style1 .contact-item {
    padding: 8px 0;
}

.chromax-mobile-contacts.style1 .contact-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    display: block;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chromax-mobile-contacts.style1 .contact-link:hover,
.chromax-mobile-contacts.style1 .contact-link:focus {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Стиль 2 - Горизонтальный с иконками (email слева, телефон справа) */
.chromax-mobile-contacts.style2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}

.chromax-mobile-contacts.style2 .contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f5f5f5; /* Единый светло-серый фон */
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.chromax-mobile-contacts.style2 .contact-item:hover,
.chromax-mobile-contacts.style2 .contact-item:focus {
    background: #e8e8e8; /* Чуть темнее при наведении */
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.chromax-mobile-contacts.style2 .contact-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.chromax-mobile-contacts.style2 .contact-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.chromax-mobile-contacts.style2 .contact-label {
    font-size: 10px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.chromax-mobile-contacts.style2 .contact-link {
    color: #333;
    text-decoration: none;
    font-size: 12px;
    display: block;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    word-break: break-word;
    font-weight: 500;
}

.chromax-mobile-contacts.style2 .contact-link:hover,
.chromax-mobile-contacts.style2 .contact-link:focus {
    color: #000;
    background: none;
}

/* Специальные стили для левой колонки (email) */
.chromax-mobile-contacts.style2 .left-column {
    grid-column: 1;
}

/* Специальные стили для правой колонки (телефон) */
.chromax-mobile-contacts.style2 .right-column {
    grid-column: 2;
}

/* Если есть только один элемент в style2, растягиваем на всю ширину */
.chromax-mobile-contacts.style2 .contact-item:only-child {
    grid-column: 1 / -1;
}

/* Стиль 3 - С иконками (вертикально) */
.chromax-mobile-contacts.style3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chromax-mobile-contacts.style3 .contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.chromax-mobile-contacts.style3 .contact-item:hover,
.chromax-mobile-contacts.style3 .contact-item:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.chromax-mobile-contacts.style3 .contact-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.chromax-mobile-contacts.style3 .contact-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    flex: 1;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
}

.chromax-mobile-contacts.style3 .contact-link:hover,
.chromax-mobile-contacts.style3 .contact-link:focus {
    color: #ffffff;
    background: none;
}

/* Touch эффекты */
.chromax-mobile-contacts .contact-item.touch-active {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(0.98);
}

/* Специальный touch эффект для style2 */
.chromax-mobile-contacts.style2 .contact-item.touch-active {
    background: #ddd !important;
}

/* Темная тема */
.dark-theme .chromax-mobile-contacts .contact-link,
.dark-mode .chromax-mobile-contacts .contact-link {
    color: #e0e0e0;
}

.dark-theme .chromax-mobile-contacts .contact-link:hover,
.dark-mode .chromax-mobile-contacts .contact-link:hover,
.dark-theme .chromax-mobile-contacts .contact-link:focus,
.dark-mode .chromax-mobile-contacts .contact-link:focus {
    color: #ffffff;
}

.dark-theme .chromax-mobile-contacts.style2 .contact-label,
.dark-mode .chromax-mobile-contacts.style2 .contact-label {
    color: rgba(224, 224, 224, 0.7);
}

/* Интеграция с темой Chromax */
.dt_mobilenav-topbar .chromax-mobile-contacts {
    background: transparent;
    border-top-color: rgba(255, 255, 255, 0.15);
}

.dt_mobilenav-topbar .chromax-mobile-contacts .contact-link {
    border-color: rgba(255, 255, 255, 0.15);
}

.dt_mobilenav-topbar .chromax-mobile-contacts .contact-link:hover,
.dt_mobilenav-topbar .chromax-mobile-contacts .contact-link:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

/* Анимация появления */
.chromax-mobile-contacts {
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Обеспечиваем видимость только в мобильном меню */
.chromax-mobile-contacts {
    display: block;
}

/* Скрываем на десктопе */
@media (min-width: 992px) {
    .chromax-mobile-contacts {
        display: none !important;
    }
}

/* Скрываем скрытый контейнер с данными */
#chromax-mobile-contacts-data {
    display: none !important;
}

/* Дополнительные стили для фокуса */
.chromax-mobile-contacts .contact-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.chromax-mobile-contacts.style3 .contact-item:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.chromax-mobile-contacts.style2 .contact-item:focus-within {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: 2px;
}

/* Поддержка различных тем */
body[class*="theme-"] .chromax-mobile-contacts .contact-link {
    color: inherit;
}

body[class*="theme-"] .chromax-mobile-contacts .contact-link:hover,
body[class*="theme-"] .chromax-mobile-contacts .contact-link:focus {
    opacity: 0.8;
}

/* Убираем градиентные фоны и делаем единый стиль для style2 */
.chromax-mobile-contacts.style2 .email-item,
.chromax-mobile-contacts.style2 .phone-item {
    /* Единые стили уже применены выше */
}

/* Дополнительные стили для очень маленьких экранов (но без изменения на вертикальный режим) */
@media (max-width: 320px) {
    .chromax-mobile-contacts.style2 {
        gap: 8px;
    }
    
    .chromax-mobile-contacts.style2 .contact-item {
        padding: 10px 8px;
    }
    
    .chromax-mobile-contacts.style2 .contact-link {
        font-size: 11px;
    }
    
    .chromax-mobile-contacts.style2 .contact-label {
        font-size: 9px;
    }
    
    .chromax-mobile-contacts.style2 .contact-icon {
        font-size: 16px;
        width: 20px;
    }
}