/* Copyright (c) 2025-2026 William Chesher | MIT License */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin: 0;
}

/* Miniverse selector */
.miniverse-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.mv-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
    text-decoration: none;
    color: #555;
}

.mv-chip:hover {
    border-color: #bbb;
    background: #f8f8f8;
}

.mv-chip.active {
    border-color: var(--accent);
    background: var(--accent-bg, rgba(124, 111, 174, 0.08));
    color: var(--accent);
    font-weight: 500;
}

.mv-chip .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mv-chip .status-dot.online { background: #4caf50; }
.mv-chip .status-dot.offline { background: #bdbdbd; }

.mv-chip .miniid {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    color: #999;
}

/* Category filter chips */
/* Search pill */
.search-bar {
    position: relative;
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.search-bar input {
    width: 100%;
    padding: 0.45rem 1rem 0.45rem 2.2rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.8rem;
    background: #fff;
    color: #333;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg, rgba(124, 111, 174, 0.08));
}

.search-bar input::placeholder {
    color: #aaa;
}

.search-bar .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.75rem;
    pointer-events: none;
}

/* Category sections */
.category-section {
    margin-bottom: 2rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

.category-header i {
    color: var(--accent);
    font-size: 0.85rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.6rem;
}

/* Dashboard link cards */
.dash-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.dash-card:hover {
    border-color: var(--accent, #7c6fae);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.dash-card .dash-icon {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    border-radius: 6px;
    background: linear-gradient(145deg, var(--accent, #7c6fae), var(--accent-dark, #5c4f8e));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.dash-card .dash-text {
    flex: 1;
    min-width: 0;
}

.dash-card .dash-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
}

.dash-card .dash-desc {
    font-size: 0.7rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Recently viewed highlight */
.dash-card.recent {
    border-color: var(--accent, #7c6fae);
    border-left: 3px solid var(--accent, #7c6fae);
}

/* Dim dashboards with no data for this miniverse */
.dash-card.no-data {
    opacity: 0.4;
}

.dash-card.no-data:hover {
    opacity: 0.7;
}

/* Global fleet cards */
.global-card {
    background: linear-gradient(135deg, rgba(124, 255, 220, 0.04), rgba(124, 200, 255, 0.04));
    border-color: rgba(124, 200, 255, 0.3);
}

.global-card:hover {
    border-color: rgba(124, 200, 255, 0.5);
}

/* Empty/loading states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: #aaa;
    font-size: 0.85rem;
    display: none;
}

/* Owner label below miniverse name in selector */
.mv-chip .owner {
    font-size: 0.65rem;
    color: #aaa;
}

/* Dark theme */
html.dark-theme .mv-chip {
    background: #1e1e2e;
    border-color: #3a3a4a;
    color: #aaa;
}

html.dark-theme .mv-chip:hover {
    border-color: #4a4a5a;
    background: #252538;
}

html.dark-theme .mv-chip.active {
    background: rgba(131, 132, 189, 0.12);
    border-color: var(--accent);
    color: var(--accent-light, #b8aade);
}

html.dark-theme .search-bar input {
    background: #1e1e2e;
    border-color: #3a3a4a;
    color: #e0e0e0;
}

html.dark-theme .search-bar input:focus {
    box-shadow: 0 0 0 3px rgba(131, 132, 189, 0.12);
}

html.dark-theme .search-bar input::placeholder {
    color: #666;
}

html.dark-theme .category-header {
    color: #666;
}

html.dark-theme .dash-card {
    background: #1e1e2e;
    border-color: #3a3a4a;
}

html.dark-theme .dash-card:hover {
    border-color: var(--accent);
}

html.dark-theme .dash-card .dash-name {
    color: #e0e0e0;
}

html.dark-theme .dash-card .dash-desc {
    color: #666;
}

html.dark-theme .global-card {
    background: linear-gradient(135deg, rgba(124, 255, 220, 0.03), rgba(124, 200, 255, 0.03));
    border-color: rgba(124, 200, 255, 0.2);
}

html.dark-theme .global-card:hover {
    border-color: rgba(124, 200, 255, 0.4);
}

html.dark-theme .empty-state,
html.dark-theme .no-results {
    color: #666;
}
