/**
 * Стили для блока районов в сайдбаре (page-author-103)
 */

.rayons-widget {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rayons-widget h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

/* Список районов */
.rayons-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rayon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.375rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    border: 1px solid transparent;
    min-height: 44px; /* Минимальный размер для мобильных */
}

.rayon-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    transform: translateX(2px);
}

.rayon-item:active {
    transform: translateX(0);
}

.rayon-item:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rayon-item--active {
    background: #dbeafe;
    border-color: #3b82f6;
}

.rayon-name {
    flex: 1;
    font-size: 0.875rem;
    color: #1f2937;
    font-weight: 500;
    line-height: 1.5;
}

.rayon-meta {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    margin-left: 0.5rem;
}

/* Скрытие районов на мобильных (показываем только первые 5) - применяется через JS */
.rayon-item--mobile-hidden {
    display: none !important;
}

/* Временная метка на карте */
.rayon-temp-marker {
    background: transparent !important;
    border: none !important;
}

.rayon-marker-inner {
    background: #3b82f6;
    color: #fff;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.rayon-marker-inner::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #3b82f6;
}

.rayon-marker-name {
    display: block;
}

/* Кнопка "Показать еще" */
.rayons-show-more {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    display: none; /* По умолчанию скрыта, показывается только на мобильных */
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.rayons-show-more:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.rayons-show-more:active {
    background: #bfdbfe;
}

.rayons-show-more:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.rayons-show-more-count {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .rayons-widget {
        padding: 1rem;
    }
    
    .rayon-item {
        padding: 0.75rem;
        min-height: 48px;
    }
    
    .rayon-name {
        font-size: 0.8125rem;
    }
    
    .rayon-meta {
        font-size: 0.6875rem;
    }
}

/* Мобильная версия всегда светлая (поверх prefers-color-scheme) */
@media (max-width: 768px) {
    .rayons-widget {
        background: #fff;
        color: #1f2937;
    }
    .rayons-widget h3 {
        color: #1f2937;
    }
    .rayons-search-input {
        background: #fff;
        border-color: #e5e7eb;
        color: #1f2937;
    }
    .rayon-item:hover {
        background: #f3f4f6;
        border-color: #e5e7eb;
    }
    .rayon-item--active {
        background: #dbeafe;
        border-color: #3b82f6;
    }
    .rayon-name {
        color: #1f2937;
    }
    .rayon-meta {
        color: #6b7280;
    }
}

