/*
 * Page-level notices shared by the visualizer and the analyzer: error cards and the start card
 * shown while a run's first data is on its way.
 */
.notice-scrim {
    --notice-card-bg: #14141e;
    --notice-card-border: #2a2a3a;
    --notice-text-primary: #e6e6ee;
    --notice-text-secondary: #a4a4b4;
    --notice-text-muted: #6e6e80;
    --notice-accent: #4a9eff;
    --notice-accent-soft: rgba(74, 158, 255, 0.14);
    --notice-error: #ff6b6b;
    --notice-error-soft: rgba(255, 107, 107, 0.12);
    --notice-button-bg: #262638;
    --notice-button-border: #3c3c55;
    --notice-button-hover: #30304a;

    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 6, 12, 0.72);
    backdrop-filter: blur(2px);
    font-family: 'Roboto Mono', 'Courier New', monospace;
}

/* A closable notice leaves the page usable, so the page stays visible behind it */
.notice-scrim.notice-light {
    background: rgba(6, 6, 12, 0.35);
    backdrop-filter: none;
}

.notice {
    width: 440px;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
    background: var(--notice-card-bg);
    border: 1px solid var(--notice-card-border);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    padding: 22px 24px 20px;
    color: var(--notice-text-primary);
}

.notice-title {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 8px;
    word-break: break-word;
}

.notice-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--notice-text-secondary);
    margin: 0;
}

.notice-detail {
    margin: 12px 0 0;
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--notice-text-muted);
    background: #0e0e17;
    border: 1px solid #22222f;
    word-break: break-word;
}

.notice-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.notice-button {
    font: inherit;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--notice-text-primary);
    background: var(--notice-button-bg);
    border: 1px solid var(--notice-button-border);
    transition: background-color 0.15s ease;
}

.notice-button:hover {
    background: var(--notice-button-hover);
}

.notice-button.primary {
    background: var(--notice-accent-soft);
    border-color: rgba(74, 158, 255, 0.45);
    color: #cfe4ff;
}

.notice-button.primary:hover {
    background: rgba(74, 158, 255, 0.24);
}

/* ── Error card ─────────────────────────────────── */

.notice.notice-error {
    border-top: 3px solid var(--notice-error);
}

.notice.notice-error .notice-title {
    color: #ffd0d0;
}

.notice.notice-error .notice-title::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--notice-error);
    box-shadow: 0 0 0 4px var(--notice-error-soft);
    margin: 0 10px 1px 1px;
}

/* ── Start card ─────────────────────────────────── */

.notice.notice-start {
    width: 470px;
    text-align: center;
    padding: 30px 32px 26px;
}

.notice-start-logo {
    font-family: 'Doto', sans-serif;
    font-weight: 900;
    font-size: 44px;
    letter-spacing: 2px;
    line-height: 1;
    opacity: 0.92;
}

.notice-start .notice-title {
    margin: 18px 0 6px;
}

.notice-start .notice-text {
    font-size: 12px;
}

.notice-progress {
    position: relative;
    height: 4px;
    margin: 22px 0 10px;
    border-radius: 2px;
    background: #22222f;
    overflow: hidden;
}

.notice-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 2px;
    background: var(--notice-accent);
    transition: width 0.6s ease;
}

/* While the indexers work, the rest of the bar keeps moving instead of standing at full */
.notice-progress.indexing::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 80%;
    width: 20%;
    background: repeating-linear-gradient(90deg,
        rgba(74, 158, 255, 0.15) 0 6px,
        rgba(74, 158, 255, 0.55) 6px 12px);
    background-size: 24px 100%;
    animation: notice-indexing 0.8s linear infinite;
}

@keyframes notice-indexing {
    from { background-position: 0 0; }
    to { background-position: 24px 0; }
}

.notice-phases {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--notice-text-muted);
}

.notice-phases .active {
    color: var(--notice-accent);
}

.notice-stats {
    display: flex;
    justify-content: center;
    gap: 26px;
    margin-top: 18px;
    font-size: 11px;
    color: var(--notice-text-muted);
}

.notice-stats b {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--notice-text-primary);
    margin-bottom: 2px;
}

.notice-log {
    margin-top: 16px;
    padding: 8px 10px;
    border-radius: 4px;
    text-align: left;
    font-size: 11px;
    line-height: 1.5;
    color: #ffb4b4;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.25);
}

.notice-log-line + .notice-log-line {
    margin-top: 4px;
}

.notice-run {
    margin-top: 16px;
    font-size: 10.5px;
    color: var(--notice-text-muted);
}
