body {
    font-family: sans-serif;
    margin: 2em;
}

input {
    padding: 0.5em;
    width: 300px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1em;
}

th, td {
    border: 1px solid #ccc;
    padding: 0.5em;
    text-align: left;
}

th {
    background: #f5f5f5;
    cursor: pointer;
}

tr:hover {
    background: #f0f0f0;
}

.type-requires {
    background: #f3faff;
}

.type-optional {
    background: #fff8e1;
}

.type-provides {
    color: #2980b9;
}

#tabs {
    margin-bottom: 1em;
}

.tab-button {
    padding: 0.6em 1.2em;
    margin-right: 0.5em;
    border: none;
    border-radius: 6px;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 14px;
}

.tab-button.active {
    background-color: #2980b9;
    color: white;
}

.tab-view {
    display: none;
}

.tab-view.active {
    display: block;
}

#api-select {
    padding: 8px;
    width: 100%;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.dropdown {
    position: absolute;
    border: 1px solid #ccc;
    background: white;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    border-top: none;
    z-index: 1000;
    font-size: 14px;
}

.dropdown-item {
    padding: 6px 12px;
    cursor: pointer;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: #f0f0f0;
}

.dropdown-item strong {
    color: #000;
}

th.asc::after {
    content: " ▲";
}

th.desc::after {
    content: " ▼";
}

.simple-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 14px;
}

.simple-table th,
.simple-table td {
    border: 1px solid #ddd;
    padding: 6px 10px;
}

.simple-table th {
    background-color: #f9f9f9;
    text-align: left;
}

.simple-table a {
    text-decoration: none;
    color: #0366d6;
}

.simple-table a:hover {
    text-decoration: underline;
}

/* Add these styles to your existing CSS */

.simple-table th {
    background-color: #f9f9f9;
    text-align: left;
    cursor: pointer; /* Make it clear headers are clickable */
    user-select: none; /* Prevent text selection when clicking */
    position: relative;
}

.simple-table th:hover {
    background-color: #e9e9e9;
}

.simple-table th.asc::after {
    content: " ▲";
    color: #666;
}

.simple-table th.desc::after {
    content: " ▼";
    color: #666;
}

/* Style for the last column header (no sorting) */
.simple-table th:last-child {
    cursor: default;
}

.simple-table th:last-child:hover {
    background-color: #f9f9f9;
}

.view-usage-btn {
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
}

#dependency-table .view-usage-btn {
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 3px;
    transition: background-color 0.2s;
}

#dependency-table .view-usage-btn:hover {
    background-color: #1976d2;
}

/* Make the Action column narrower */
#dependency-table th:last-child,
#dependency-table td:last-child {
    width: 100px;
    text-align: center;
}

/* Ensure buttons don't break the table layout */
#dependency-table td:last-child {
    white-space: nowrap;
}

.export-csv-btn {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.export-csv-btn:hover {
    background-color: #218838;
}

.export-csv-btn:active {
    background-color: #1e7e34;
}

.export-csv-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Ensure proper spacing in the API details header */
#api-details h3 {
    margin: 0.5em 0;
}

/* Style for the header container */
#api-details > div:first-child {
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

/* Apps View Styles */
.app-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1.5em;
    margin-bottom: 1.5em;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.app-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.app-card h3 {
    margin-top: 0;
    color: #2980b9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-card .app-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 1em;
}

.app-card .app-platform {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

.app-card .platform-base {
    background-color: #e3f2fd;
    color: #1976d2;
}

.app-card .platform-complete {
    background-color: #e8f5e9;
    color: #388e3c;
}

.app-section {
    margin: 1em 0;
}

.app-section h4 {
    margin: 0.5em 0;
    color: #555;
    font-size: 16px;
}

.app-list {
    list-style: none;
    padding: 0;
    margin: 0.5em 0;
}

.app-list li {
    padding: 6px 12px;
    margin: 4px 0;
    background: #f8f9fa;
    border-left: 3px solid #2980b9;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-list li code {
    font-weight: bold;
    color: #c7254e;
    background-color: #f9f2f4;
    padding: 2px 4px;
    border-radius: 3px;
}

.app-list li .version {
    color: #666;
    font-size: 13px;
}

.app-list.dependencies li {
    border-left-color: #9c27b0;
}

.app-list.modules li {
    border-left-color: #4caf50;
}

.app-list.ui-modules li {
    border-left-color: #ff9800;
}

.empty-section {
    color: #999;
    font-style: italic;
    padding: 8px;
}

/* App Dependencies Graph Styles */
.app-dependencies-controls .graph-btn {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.app-dependencies-controls .graph-btn:hover {
    background-color: #1976d2;
}

.app-dependencies-controls .graph-btn:active {
    background-color: #1565c0;
}

#app-dependencies-graph {
    position: relative;
}

#app-dependencies-legend h4 {
    color: #333;
    font-size: 16px;
}




