/* =============================================================
   dossier.css — Досье персонажа: фото, сетка данных, связи
   ============================================================= */

/* === МОДАЛКА ПЕРСОНАЖА === */

.char-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

#char-modal { z-index: 5200; }

.char-modal .dossier-container {
    background: #050505;
    border: 2px solid var(--blood-red);
    padding: 25px;
    width: 90%;
    max-width: 650px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(138, 3, 3, 0.5);
    flex-shrink: 0;
}

/* === ШАПКА ДОСЬЕ === */

.dossier-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--blood-red);
    padding-bottom: 15px;
}

/* === ФОТО === */

.photo-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.dossier-photo-container {
    position: relative;
    width: 150px; height: 150px;
    border: 1px solid var(--blood-red);
    overflow: hidden;
}

#char-photo {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

.dossier-photo {
    width: 140px; height: 140px;
    border: 1px solid #333;
    position: relative;
    overflow: hidden;
    background: #111;
}

.dossier-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.2) brightness(0.8);
}

/* Сканирующая линия на фото */
.scanline {
    width: 100%;
    height: 2px;
    background: rgba(138, 3, 3, 0.3);
    position: absolute;
    top: 0;
    animation: scanning 3s linear infinite;
}

@keyframes scanning {
    0%   { top: 0;    }
    100% { top: 100%; }
}

/* === ШТРИХКОД === */

.barcode {
    font-family: monospace;
    letter-spacing: -2px;
    font-size: 20px;
    color: #333;
    margin: 5px 0;
}

/* === ТАБЛИЦА ДАННЫХ === */

.dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    background: rgba(20, 20, 20, 0.8);
    padding: 10px;
    margin-bottom: 20px;
}

.dossier-item {
    display: flex;
    flex-direction: column;
}

.dossier-item .label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}

.dossier-item .value {
    font-size: 14px;
    color: var(--text-main);
}

/* === ОПИСАНИЕ === */

.details-text {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #bbb;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

/* === ПОДВАЛ ДОСЬЕ === */

.dossier-footer {
    margin-top: 25px;
    font-size: 9px;
    color: #333;
    font-family: monospace;
    text-align: right;
    letter-spacing: 2px;
}

/* === ПАУТИНА СВЯЗЕЙ === */

.dossier-connections {
    margin-top: 15px;
    border-top: 1px dashed #333;
    padding-top: 15px;
}

.conn-row {
    margin-bottom: 8px;
    font-size: 13px;
}

.conn-row.hidden {
    display: none;
}

.conn-label {
    color: #666;
    font-family: monospace;
    display: inline-block;
    width: 80px;
}

.conn-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Кликабельная ссылка на персонажа */
.char-link-tag {
    color: var(--text-main);
    background: #111;
    border: 1px solid #333;
    padding: 2px 6px;
    cursor: pointer;
    font-family: monospace;
    transition: all 0.2s ease;
}

.char-link-tag:hover {
    color: var(--blood-red);
    border-color: var(--blood-red);
    box-shadow: 0 0 8px rgba(138, 3, 3, 0.4);
    transform: translateY(-1px);
}

/* Персонаж не найден в базе */
.char-link-dead {
    color: #444;
    padding: 2px 6px;
    font-family: monospace;
    cursor: help;
}
