/* Стили для меток типа контента - Single-Source-of-Truth */

.content-type-badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Размеры меток */
.content-type-badge.badge-sm {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
}

.content-type-badge.badge-lg {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Метки публикации */
.publication-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    background-color: #ffc107 !important;
    color: #000 !important;
    border: 1px solid #ffb300;
    font-weight: 500;
}

.publication-badge i {
    margin-right: 0.25rem;
}

/* Метки геолокации */
.location-badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    background-color: #17a2b8 !important;
    color: #fff !important;
    border: 1px solid #138496;
    font-weight: 500;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.location-badge i {
    margin-right: 0.25rem;
}

/* Цвета для типов контента */
.content-type-badge.content-type-blog {
    background-color: #0d6efd;
    color: white;
}

.content-type-badge.content-type-gallery {
    background-color: #198754;
    color: white;
}

.content-type-badge.content-type-news {
    background-color: #0dcaf0;
    color: #000;
}

.content-type-badge.content-type-article {
    background-color: #0d6efd;
    color: white;
}

.content-type-badge.content-type-album {
    background-color: #198754;
    color: white;
}

/* Иконки в метках */
.content-type-badge .icon {
    font-size: 0.875em;
}

/* Hover эффекты */
.content-type-badge:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Кликабельные картинки */
.content-index-item img {
    transition: opacity 0.3s ease;
}

.content-index-item img:hover {
    opacity: 0.8;
}

/* Бейджи поверх картинки */
.content-image-container {
    position: relative;
}

.content-image-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10;
}

.content-image-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 80px;
    text-align: center;
    white-space: nowrap;
}

/* Стили для разных типов бейджей поверх картинки */
.content-image-badge.type-gallery {
    background: #198754;
    color: white;
}

.content-image-badge.type-album {
    background: #198754;
    color: white;
}

.content-image-badge.type-blog {
    background: #0d6efd;
    color: white;
}

.content-image-badge.type-news {
    background: #dc3545;
    color: white;
}

.content-image-badge.location {
    background: #17a2b8;
    color: white;
}

/* Индикаторы точности геолокации */
.location-accuracy-indicator {
    font-size: 0.6rem;
    margin-left: 0.25rem;
    opacity: 0.8;
}

.location-accuracy-indicator.exact {
    color: #28a745; /* Зеленый для точной локации */
}

.location-accuracy-indicator.approximate {
    color: #ffc107; /* Желтый для приблизительной локации */
}

.content-image-badge.unpublished {
    background: #ffc107;
    color: #212529;
}

.content-image-badge.views {
    background: #6c757d;
    color: white;
}

.content-image-badge.downloads {
    background: #198754;
    color: white;
}

.content-image-badge.moderation {
    background: #ffc107;
    color: #212529;
}

.content-image-badge.images {
    background: #0d6efd;
    color: white;
}

.content-image-badge.likes {
    background: #dc3545;
    color: white;
}

/* Стилизация card-header с пользователем */
.card-header .d-flex.gap-2 {
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-header small {
    font-size: 0.8rem;
    line-height: 1.2;
}

.card-header small a {
    color: inherit;
    transition: color 0.2s ease;
}

.card-header small a:hover {
    color: #0d6efd;
}

/* Стили для изображений-заглушек */
.content-image-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.content-image-placeholder:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.content-image-placeholder i {
    color: #6c757d;
    opacity: 0.7;
}

.content-image-placeholder:hover i {
    color: #495057;
    opacity: 1;
}

/* Стили тегов в стиле scalemodels.ru */
.tags {
    clear: both;
    margin-top: 10px;
    display: inline-block;
}

/* Контейнер для страницы тегов */
.tags-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.tags-container .tags {
    margin-top: 0;
    display: block;
}

/* Стили для страницы тегов */
.tags-page-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #dee2e6;
}

.tags-page-header h1 {
    margin-bottom: 10px;
    color: #495057;
}

.tags-page-header .lead {
    color: #6c757d;
    margin-bottom: 0;
}

/* Адаптивность для тегов */
@media (max-width: 768px) {
    .tags-container {
        padding: 15px;
    }

    .tags .tag {
        font-size: 0.75rem;
        padding: 4px 8px;
        margin: 2px 4px 2px 0;
    }
}

.tags .tag {
    display: inline-block;
    margin: 3px 6px 3px 0;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #ced4da;
    border-radius: 20px 0 0 20px;
    text-decoration: none;
    color: #495057;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tags .tag::before {
    content: '#';
    color: #6c757d;
    font-weight: 600;
    margin-right: 2px;
}

.tags .tag:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #adb5bd;
    color: #212529;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tags .tag .count {
    color: #6c757d;
    font-size: 0.75rem;
    margin-left: 2px;
    background-color: rgba(108, 117, 125, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 400;
}

/* Альтернативный стиль тегов - более современный */
.tags.modern .tag {
    background: #ffffff;
    border: 2px solid #e3f2fd;
    border-radius: 20px 0 0 20px;
    color: #1976d2;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tags.modern .tag:hover {
    background: #e3f2fd;
    border-color: #1976d2;
    color: #0d47a1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.tags.modern .tag::before {
    color: #1976d2;
}

.tags.modern .tag .count {
    background-color: rgba(25, 118, 210, 0.1);
    color: #1976d2;
    margin-left: 2px;
}

/* Стиль тегов как на GitHub */
.tags.github .tag {
    background: #f1f8ff;
    border: 1px solid #d1d9e0;
    color: #0366d6;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 6px 0 0 6px;
    font-weight: 500;
}

.tags.github .tag:hover {
    background: #e1ecf4;
    border-color: #0366d6;
    color: #0257d5;
}

.tags.github .tag::before {
    color: #0366d6;
}

.tags.github .tag .count {
    background-color: #dbeafe;
    color: #1e40af;
    font-size: 0.7rem;
    padding: 1px 4px;
    border-radius: 4px;
    margin-left: 2px;
}

/* Стили для информации о статье (как на scalemodels.ru) */
.article-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.article-info .header {
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.article-info .info {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.article-info .info br {
    margin-bottom: 5px;
}

/* Стили для голосования (как на scalemodels.ru) */
.voting-section {
    margin-bottom: 20px;
}

.voting-section .header {
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.votes-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vote-button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

.vote-button img {
    width: 20px;
    height: 20px;
}

.votes-result {
    font-size: 0.85rem;
    color: #495057;
    font-weight: 500;
}

/* Стили для боковой панели (как на scalemodels.ru) */
.sidebar-info {
    float: left;
    width: 330px;
}

.sidebar-info .info-block {
    margin-bottom: 20px;
}

.sidebar-info .info-block .header {
    font-weight: bold;
    color: #495057;
    margin-bottom: 10px;
    font-size: 0.9rem;
    width: 300px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .content-type-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }

    .card-header {
        padding: 0.5rem 0.75rem;
    }

    .card-header small {
        font-size: 0.75rem;
    }

    .sidebar-info {
        float: none;
        width: 100%;
    }

    .sidebar-info .info-block .header {
        width: 100%;
    }
}
