/* Tab Content */
.tab-content {
    display: none;
    margin-top: 20px;
}

.tab-content.active {
    display: block;
}

/* Table Styles */
.kit-relationships-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kit-relationships-list li {
    margin-bottom: 5px;
}

.kit-relationships-list li:last-child {
    margin-bottom: 0;
}

.no-relationships {
    color: #666;
    font-style: italic;
}

.row-actions {
    visibility: hidden;
}

tr:hover .row-actions {
    visibility: visible;
}

/* Relationship Strength Indicator */
.relationship-strength {
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.relationship-strength.low .strength-indicator {
    background-color: #4CAF50;
}

.relationship-strength.medium .strength-indicator {
    background-color: #FFC107;
}

.relationship-strength.high .strength-indicator {
    background-color: #F44336;
}

.strength-value {
    font-weight: bold;
}

/* Graph View */
#kit-relationships-graph {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* Stats View */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stats-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stats-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #23282d;
    font-size: 1.2em;
}

/* Search and Filter Controls */
.tablenav.top {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#kit-search {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
}

#filter-relationship-type {
    margin-right: 10px;
}

/* DataTables Customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 15px;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 15px;
}

/* Responsive Design */
@media screen and (max-width: 782px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    #kit-relationships-graph {
        height: 400px;
    }

    .tablenav.top {
        flex-direction: column;
        gap: 10px;
    }

    #kit-search {
        width: 100%;
    }
}

/* Export Button */
#export-csv {
    margin-left: 10px;
}

/* Hover Effects */
.kit-relationships-list a:hover {
    color: #0073aa;
    text-decoration: underline;
}

.stats-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.kit-relationships {
    width: 100%;
    display: block;
}

.kit-relationships-container {
    display: flex;
    flex-direction: row;
    gap: 30px;
    width: 100%;
    justify-content: space-between;
}

@media screen and (max-width: 782px) {
    .kit-relationships-container {
        flex-direction: column;
    }
}

.prerequisite-kits,
.advanced-kits {
    flex: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.kit-relationships h3 {
    margin-bottom: 6px;
    font-weight: 600;
    text-align: left;
}

/* Netflix scroll visuals are provided by `kit-netflix-scroll.css`.
   We only add minimal overrides for this widget. */

.kit-relationships .kit-title-overlay h4 {
    text-transform: uppercase;
}

/* Ensure scroll container width behaves nicely inside 2-column layout */
.kit-relationships .kit-netflix-scroll-container {
    width: 100%;
}
.kit-relationships .kit-scroll-container {
    width: 100%;
    /* show at most 3 tiles in the viewport; more via scroll/buttons */
    max-width: calc((3 * 180px) + (2 * 10px));
}

/* Fix oversized tiles (Netflix widget sets width via Elementor control; here we pin a sensible size) */
.kit-relationships .kit-item {
    width: 180px;
    height: 250px;
}

/* Keep thumbnail and image dimensions in sync with the tile size */
.kit-relationships .kit-thumbnail,
.kit-relationships .kit-thumbnail img {
    width: 180px;
    height: 250px;
}

/* Shimmer, buttons, overlays etc. are handled by `kit-netflix-scroll.css` to keep both sections identical. */

.no-kits {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    padding: 16px;
    border-radius: 12px;
    background: #101010;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.78);
    font-style: italic;
    text-align: left;
    height: 100%;
} 

@media screen and (max-width: 782px) {
    .prerequisite-kits,
    .advanced-kits {
        width: 100%;
    }
    .kit-relationships .kit-scroll-wrapper {
        gap: 8px;
    }
}

/* Keep responsive behavior identical to the Netflix scroll widget */