/* Site-wide design tokens. Loaded on every page that also loads one of the
   page-family stylesheets (table-page.css/detail.css/trajectory-viewer.css/
   star-map.css/globe-viewer.css), so this file must come first in <head>. */

/* Generic visibility utility, used instead of setting el.style.display from JS. */
.hidden {
    display: none !important;
}

:root {
    --accent-20: rgba(100, 181, 246, 0.2);
    --accent-30: rgba(100, 181, 246, 0.3);
    --accent-35: rgba(100, 181, 246, 0.35);
    --accent-40: rgba(100, 181, 246, 0.4);
    --bg-toolbar: rgba(30, 30, 40, 0.95);
    --text: #ffffff;
    --text-muted: #333;
    --heading: #2c3e50;
    --border-light: #ddd;
    --danger: #ff6b6b;
    --success: #28a745;
}

/* Shared confirmation dialog (dialogs.js), used across both table pages and
   detail pages. */

.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.confirm-dialog {
    background: #2d2d3d;
    border: 1px solid var(--accent-30);
    border-radius: 8px;
    padding: 24px;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.confirm-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text);
    margin-bottom: 16px;
}

.confirm-message {
    color: #ccc;
    margin-bottom: 24px;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.confirm-btn {
    padding: 8px 16px;
    background: rgba(100, 100, 100, 0.2);
    border: 1px solid rgba(100, 100, 100, 0.4);
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.confirm-btn.primary {
    background: var(--accent-20);
    border: 1px solid var(--accent-40);
}

/* Shared toast notification (notifications.js) */
@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #2b2b2b;
    border-radius: 8px;
    padding: 16px 20px;
    max-width: 400px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    animation: slideIn 0.3s ease-out;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.toast-icon {
    font-size: 20px;
}

.toast-body {
    flex: 1;
}

.toast-title {
    font-weight: bold;
    color: var(--text);
    margin-bottom: 4px;
}

.toast-message {
    color: #ddd;
    font-size: 14px;
}

/* Async multi-select filter dropdown (filter-components.js) */
.async-filter-dropdown {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    max-height: 200px;
    overflow-y: auto;
    min-width: 200px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.async-filter-dropdown-empty {
    padding: 6px 10px;
    color: #999;
    font-size: 0.9em;
}

.async-filter-dropdown-row {
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.9em;
}

.async-filter-dropdown-row:hover {
    background: #f0f0f0;
}

.async-filter-dropdown-row.selected {
    background: #e8f4fd;
}

.async-filter-dropdown-row.selected:hover {
    background: #cce8f4;
}

.async-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.async-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    background: #3498db;
    color: #fff;
    border-radius: 12px;
    font-size: 0.8em;
}

.async-filter-tag-remove {
    cursor: pointer;
    font-weight: bold;
    margin-left: 2px;
}
