/* NavData AIRAC Changelog Styles */

/* Summary Cards */
.navdata-card {
    border-left: 3px solid #6c757d;
    transition: border-color 0.2s;
}
.navdata-card.has-changes {
    border-left-color: #17a2b8;
}
.navdata-card .card-body {
    padding: 0.6rem 0.8rem;
}
.navdata-card .card-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.25rem;
}
.navdata-card .card-stat {
    font-size: 0.8rem;
    line-height: 1.3;
}
.navdata-card .stat-added { color: #28a745; }
.navdata-card .stat-modified { color: #fd7e14; }
.navdata-card .stat-removed { color: #dc3545; }
.navdata-card .stat-preserved { color: #6c757d; }

/* Action Badges */
.badge-action {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2em 0.5em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-added { background-color: #28a745; color: #fff; }
.badge-moved { background-color: #fd7e14; color: #fff; }
.badge-changed { background-color: #17a2b8; color: #fff; }
.badge-superseded { background-color: #6f42c1; color: #fff; }
.badge-removed { background-color: #dc3545; color: #fff; }

/* Type Badges */
.badge-type {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.15em 0.45em;
    text-transform: uppercase;
    background-color: #e9ecef;
    color: #495057;
}

/* Changes Table */
#changes-table {
    font-size: 0.82rem;
}
#changes-table tbody tr.change-row {
    cursor: pointer;
}
#changes-table tbody tr.change-row:hover {
    background-color: #f8f9fa;
}
#changes-table tbody tr.change-row.expanded {
    background-color: #eef6ff;
    border-bottom: none;
}
#changes-table tbody tr.change-row td:first-child {
    position: relative;
    padding-left: 1.3rem;
}
#changes-table tbody tr.change-row td:first-child::before {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.55rem;
    position: absolute;
    left: 0.4rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    transition: transform 0.15s;
}
#changes-table tbody tr.change-row.expanded td:first-child::before {
    transform: translateY(-50%) rotate(90deg);
    color: #007bff;
}
#changes-table td {
    vertical-align: middle;
}
.change-name {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 600;
    font-size: 0.85rem;
}
.change-detail {
    font-size: 0.78rem;
    color: #555;
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.change-detail .delta-nm {
    color: #fd7e14;
    font-weight: 600;
}

/* Detail Panel (expanded row) */
tr.detail-row {
    background-color: #f8fbff;
}
tr.detail-row > td {
    padding: 0.75rem 1rem 0.75rem 1.5rem;
    border-top: none;
}
.navdata-detail {
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.navdata-detail-section {
    flex: 1;
    min-width: 200px;
}
.navdata-detail-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.navdata-detail-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    word-break: break-all;
}

/* Route diff */
.route-diff {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    word-break: break-word;
}
.route-diff .diff-removed {
    background-color: #fdd;
    color: #a00;
    padding: 1px 3px;
    border-radius: 2px;
    text-decoration: line-through;
}
.route-diff .diff-added {
    background-color: #dfd;
    color: #080;
    padding: 1px 3px;
    border-radius: 2px;
}
.route-diff .diff-unchanged {
    color: #555;
}

/* Coordinate detail */
.coord-old {
    color: #dc3545;
}
.coord-new {
    color: #28a745;
}
.coord-arrow {
    color: #6c757d;
    margin: 0 0.3rem;
}

/* Search Highlight */
.search-match {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

/* Filter Button States */
#action-filter .btn.active {
    font-weight: 600;
}

/* Scope Filter */
#scope-filter .btn.active {
    font-weight: 600;
}

/* Source Badges */
.badge-source-nasr {
    background-color: #1a5276;
    color: #fff;
    font-size: 0.6rem;
    padding: 0.1em 0.35em;
    text-transform: uppercase;
}
.badge-source-intl {
    background-color: #7d3c98;
    color: #fff;
    font-size: 0.6rem;
    padding: 0.1em 0.35em;
    text-transform: uppercase;
}

/* Summary sub-counts for NASR/Intl breakdown */
.summary-scope-label {
    font-size: 0.6rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 4px;
}

/* Tab Badge Count */
.tab-count {
    font-size: 0.65rem;
    vertical-align: super;
    margin-left: 3px;
    color: #6c757d;
}

/* Stats Panel */
#stats-panel .stat-item {
    border-right: 1px solid #dee2e6;
}
#stats-panel .stat-item:last-child {
    border-right: none;
}
#stats-panel .stat-value {
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}
#stats-panel .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Cycle Selector */
#cycle-selector {
    font-size: 0.85rem;
}

/* Pagination Controls */
#pagination-controls {
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}
#page-size {
    background-color: #2d2d2d;
    color: #ddd;
    border-color: #555;
}

/* Empty/Loading States */
#empty-state, #loading-state {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
