/* AuDHD staging additions — audhd-microwins
   Loaded after app.css; overrides apply.
   Lives in web-staging only; never deployed to prod. */

/* ---------- F1: Stale-card "Nu vernieuwen" button ---------- */

.status-stale-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.status-stale-row .status-stale {
    margin: 0;
}

.status-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-primary, #e8eef7);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease;
    font-family: inherit;
}

.status-refresh-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}

.status-refresh-btn:focus-visible {
    outline: 2px solid var(--color-focus-outline);
    outline-offset: 2px;
}

.status-refresh-btn:disabled,
.status-refresh-btn.is-busy {
    cursor: progress;
    opacity: 0.85;
}

.status-refresh-btn.is-failed {
    border-color: rgba(255, 120, 120, 0.5);
    color: #ffb3b3;
}

.status-refresh-spin {
    display: inline-block;
    animation: audhd-refresh-spin 0.9s linear infinite;
    animation-play-state: paused;
}

/* Only spin while the refresh is actively in flight. Idle animation on a
   visible button is exactly the kind of continuous motion that hurts AuDHD
   focus — keep it paused at rest. */
.status-refresh-btn.is-busy .status-refresh-spin {
    animation-play-state: running;
}

@keyframes audhd-refresh-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.status-refresh-text {
    white-space: nowrap;
}

/* On very tight cards, hide the text label and keep the icon only */
@media (max-width: 480px) {
    .status-refresh-text {
        display: none;
    }
    .status-refresh-btn {
        padding: 4px 8px;
    }
}

/* ---------- F2: Stays RangePicker quick-preset chips ---------- */

.range-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 12px;
}

.range-quick-chip {
    appearance: none;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.2;
    color: var(--text-primary, #e8eef7);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
    font-family: inherit;
}

.range-quick-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.range-quick-chip:focus-visible {
    outline: 2px solid var(--color-focus-outline);
    outline-offset: 2px;
}

.range-quick-chip.is-active {
    background: rgba(106, 169, 255, 0.18);
    border-color: rgba(106, 169, 255, 0.55);
    color: #d8e8ff;
}

/* Light theme: dark-tuned active color is invisible on white tint;
   use the semantic info text-color token with a darker rgba peer. */
[data-theme="light"] .range-quick-chip.is-active {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.50);
    color: var(--color-info);
}
