/* ==========================================================================
   Stiluri Pagina Relaționare Acte HCL (relationare.html)
   ========================================================================== */

/* Header Navigation Bar */
.nav-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-gold {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35) !important;
    text-decoration: none !important;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.5) !important;
}

/* Caseta de Căutare Relaționare */
.rel-search-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.rel-search-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rel-search-grid {
    display: grid;
    grid-template-columns: 140px 180px 1fr auto;
    gap: 12px;
    align-items: flex-end;
}

.quick-examples {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--text-muted);
}

.chip-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chip-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

/* Card Act Investigat (Target Hero) */
.target-act-card {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 2px solid #bfdbfe;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    position: relative;
}

.target-badge-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.target-act-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.target-act-name {
    font-size: 19px;
    font-weight: 800;
    color: #1e3a8a;
    margin: 0 0 6px 0;
}

.target-act-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.target-act-title {
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
    margin: 8px 0 14px 0;
}

.target-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.target-actions-bar .btn-outline,
.modal-footer .btn-outline {
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600 !important;
}

.target-actions-bar .btn-outline:hover,
.modal-footer .btn-outline:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border-color: #94a3b8 !important;
}

.target-actions-bar .btn-secondary,
.modal-footer .btn-secondary {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600 !important;
}

.target-actions-bar .btn-secondary:hover,
.modal-footer .btn-secondary:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Stats Pill Bar */
.target-stats-bar {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
    flex-wrap: wrap;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.stat-pill-orange {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.stat-pill-green {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.stat-pill-blue {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

/* Container Vizual Graf */
.graph-section-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 10px;
}

.graph-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.graph-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-tool {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-tool:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

#network-container {
    width: 100%;
    height: 480px;
    background: radial-gradient(circle, #f8fafc 10%, #f1f5f9 100%);
    position: relative;
}

.graph-legend {
    display: flex;
    gap: 16px;
    padding: 10px 20px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    font-size: 11.5px;
    color: #64748b;
    flex-wrap: wrap;
    align-items: center;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot-target {
    background: #2563eb;
    border: 2px solid #1d4ed8;
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.4);
}

.legend-dot-incoming {
    background: #f59e0b;
    border: 2px solid #d97706;
}

.legend-dot-outgoing {
    background: #10b981;
    border: 2px solid #059669;
}

/* Tabs & List Section */
.relations-tabs-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 40px;
}

.rel-tabs-nav {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.rel-tab-btn {
    padding: 14px 20px;
    font-size: 13.5px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.rel-tab-btn:hover {
    color: var(--primary-color);
}

.rel-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: #ffffff;
}

.tab-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.rel-tab-btn.active .tab-badge {
    background: var(--primary-color);
    color: #ffffff;
}

.rel-tab-pane {
    display: none;
    padding: 20px;
}

.rel-tab-pane.active {
    display: block;
}

/* List of Related Acts */
.related-acts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.act-relation-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 18px;
    transition: all 0.2s ease;
    position: relative;
}

.act-relation-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.act-relation-card.relation-modificare {
    border-left: 4px solid #f59e0b;
}

.act-relation-card.relation-abrogare {
    border-left: 4px solid #ef4444;
}

.act-relation-card.relation-antecedent {
    border-left: 4px solid #10b981;
}

.act-relation-card.relation-referinta {
    border-left: 4px solid #64748b;
}

.relation-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.relation-tag {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
}

.relation-tag-modificare {
    background: #fef3c7;
    color: #b45309;
}

.relation-tag-abrogare {
    background: #fee2e2;
    color: #b91c1c;
}

.relation-tag-antecedent {
    background: #d1fae5;
    color: #065f46;
}

.relation-tag-referinta {
    background: #f1f5f9;
    color: #475569;
}

.relation-act-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-color);
}

.relation-act-title {
    font-size: 13.5px;
    color: #334155;
    line-height: 1.45;
    margin: 6px 0 10px 0;
}

.relation-snippet-box {
    background: #f8fafc;
    border-left: 3px solid #cbd5e1;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #475569;
    border-radius: 0 4px 4px 0;
    margin: 8px 0 12px 0;
    font-style: italic;
    line-height: 1.5;
}

.relation-snippet-box mark {
    background: #fef08a;
    color: #854d0e;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 2px;
}

.relation-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.relation-btn-focus {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.relation-btn-focus:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* Timeline View */
.timeline-track {
    position: relative;
    padding: 20px 0 20px 30px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 11px;
    width: 2px;
    background: #cbd5e1;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #64748b;
    box-shadow: 0 0 0 2px #ffffff;
}

.timeline-item.is-target .timeline-dot {
    border-color: #2563eb;
    background: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.timeline-item.is-modifier .timeline-dot {
    border-color: #f59e0b;
    background: #fef3c7;
}

.timeline-item.is-base .timeline-dot {
    border-color: #10b981;
    background: #d1fae5;
}

.timeline-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}

.timeline-item.is-target .timeline-content {
    border: 2px solid #93c5fd;
    background: #f0f7ff;
}

.timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 6px;
}

/* Empty State */
.empty-state-card {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .rel-search-grid {
        grid-template-columns: 1fr 1fr;
    }
    #network-container {
        height: 380px;
    }
}

@media (max-width: 600px) {
    .rel-search-grid {
        grid-template-columns: 1fr;
    }
}
