/**
 * Admin Fallout Styles
 */

/* Layout */
.fallout-admin {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fallout-detail {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fallout-form {
    max-width: 800px;
}

/* Stats Cards Row */
.fallout-admin .stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

/* Filters */
.fallout-filters {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.fallout-filters .filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.fallout-filters .filter-row .ui-input,
.fallout-filters .filter-row .ui-select {
    width: auto;
    min-width: 150px;
}

.fallout-filters .filter-row .ui-input {
    min-width: 200px;
}

.fallout-filters .filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* Table */
.fallout-table-container {
    overflow-x: auto;
}

.fallout-admin .data-table {
    width: 100%;
    border-collapse: collapse;
}

.fallout-admin .data-table th,
.fallout-admin .data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color, #374151);
}

.fallout-admin .data-table th {
    font-weight: 600;
    color: var(--text-muted, #9ca3af);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fallout-admin .data-table tbody tr:hover {
    background: var(--bg-hover, rgba(255,255,255,0.03));
}

/* Country Label */
.country-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.country-flag {
    font-size: 1.125rem;
    line-height: 1;
}

.country-name {
    color: var(--text-secondary, #d1d5db);
    font-size: 0.875rem;
}

/* Severity Indicators */
.severity-indicator {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
}

.severity--1 {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.severity--2 {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.severity--3 {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.severity--4 {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

.severity--5 {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Linked Entities List */
.linked-entities-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.linked-entity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary, #1f2937);
    border-radius: 6px;
    gap: 1rem;
}

.entity-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.entity-role-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
}

.entity-role--perpetrator {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.entity-role--victim {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.entity-role--accomplice {
    background: rgba(251, 146, 60, 0.2);
    color: #fb923c;
}

.entity-role--witness {
    background: rgba(167, 139, 250, 0.2);
    color: #a78bfa;
}

.entity-role--investigator {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.entity-role--involved {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}

.entity-name {
    color: var(--text-primary, #f9fafb);
    font-weight: 500;
}

.entity-type {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
}

/* Entity Search Results (in modal) */
.entity-search-results {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 6px;
}

.entity-search-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #374151);
}

.entity-search-item:hover {
    background: var(--bg-hover, rgba(255,255,255,0.05));
}

.entity-search-item:last-child {
    border-bottom: none;
}

.entity-search-name {
    color: var(--text-primary, #f9fafb);
    font-weight: 500;
}

.entity-search-type {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
}

.entity-search-empty {
    padding: 0.75rem;
    color: var(--text-muted, #9ca3af);
    font-size: 0.875rem;
    text-align: center;
}

/* Source publisher */
.source-publisher {
    font-size: 0.75rem;
    color: var(--text-muted, #9ca3af);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .fallout-filters {
        flex-direction: column;
    }

    .fallout-filters .filter-row {
        width: 100%;
    }

    .fallout-filters .filter-row .ui-input,
    .fallout-filters .filter-row .ui-select {
        flex: 1;
        min-width: 0;
    }

    .linked-entity-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .linked-entity-item button {
        align-self: flex-end;
    }
}
