/* Dashboard notification banner — Earn page top.
   Uses the same surface/border/radius tokens as .card / .panel so it matches every theme. */

.ch-dash-note {
    width: 100%;
    margin: 0 0 var(--space-4, 1rem);
    box-sizing: border-box;
}

.ch-dash-note__inner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    color: var(--color-text);
    background: var(--color-surface);
    border: var(--border-thin, 1px) solid var(--color-border);
    border-radius: var(--radius-xl, 0.75rem);
    box-shadow: var(--shadow-sm);
}

/* Thin accent edge in the tone colour — the only strong colour on the card. */
.ch-dash-note__inner::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--ch-note-tone);
}

.ch-dash-note__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md, 0.375rem);
    color: var(--ch-note-tone);
    background: var(--ch-note-soft);
}

.ch-dash-note__icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.ch-dash-note__body {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem var(--space-2, 0.5rem);
}

.ch-dash-note__label {
    flex: none;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ch-note-tone);
    background: var(--ch-note-soft);
}

.ch-dash-note__message {
    margin: 0;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--color-text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ch-dash-note__close {
    flex: none;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--color-text-subtle, var(--color-text-muted));
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: color var(--dur-med, 0.2s) var(--ease-out, ease), background var(--dur-med, 0.2s) var(--ease-out, ease);
}

.ch-dash-note__close:hover {
    color: var(--ch-note-tone);
    background: var(--ch-note-soft);
}

.ch-dash-note__close svg {
    width: 0.9rem;
    height: 0.9rem;
}

/* Tone + soft tint always resolved from the active theme palette. */
.ch-dash-note--info {
    --ch-note-tone: var(--color-info, var(--color-primary));
    --ch-note-soft: color-mix(in srgb, var(--color-info, var(--color-primary)) 14%, transparent);
}

.ch-dash-note--success {
    --ch-note-tone: var(--color-success, var(--color-primary));
    --ch-note-soft: var(--color-success-soft, color-mix(in srgb, var(--color-success) 14%, transparent));
}

.ch-dash-note--warning {
    --ch-note-tone: var(--color-warning, var(--color-primary));
    --ch-note-soft: var(--color-warning-soft, color-mix(in srgb, var(--color-warning) 14%, transparent));
}

.ch-dash-note--danger {
    --ch-note-tone: var(--color-danger, var(--color-primary));
    --ch-note-soft: var(--color-danger-soft, color-mix(in srgb, var(--color-danger) 14%, transparent));
}

@media (max-width: 640px) {
    .ch-dash-note__inner {
        align-items: flex-start;
        padding: var(--space-3, 0.75rem);
        border-radius: var(--radius-lg, 0.5rem);
    }

    .ch-dash-note__message {
        font-size: 0.82rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ch-dash-note__close {
        transition: none;
    }
}
