/**
 * Polish: shared loading skeletons, empty states, inline errors.
 * These tokens are page-agnostic and can be used by any snaplot-trial CSS.
 */

/* --- Skeleton shimmer used while data loads --- */
.snap-skeleton {
    display: inline-block;
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: snaplot-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
    color: transparent;
    user-select: none;
}
@keyframes snaplot-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.snap-skel-line   { display: block; height: 14px; margin-bottom: 8px; }
.snap-skel-line.lg { height: 22px; }
.snap-skel-line.sm { height: 12px; }
.snap-skel-card {
    padding: 18px;
    background: var(--snap-card, #fff);
    border: 1px solid var(--snap-border, #E5E7EB);
    border-radius: var(--snap-radius-lg, 16px);
    margin-bottom: 10px;
}

/* --- Friendlier empty state --- */
.snap-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--snap-text-muted, #6B7280);
}
.snap-empty-state-icon { font-size: 36px; opacity: 0.4; margin-bottom: 10px; }
.snap-empty-state-title { font-size: 16px; font-weight: 600; color: var(--snap-text, #2C363D); margin: 0 0 6px; }
.snap-empty-state-msg   { margin: 0 0 14px; font-size: 14px; line-height: 1.5; max-width: 360px; margin-left: auto; margin-right: auto; }

/* --- Inline error with Retry button --- */
.snap-error-retry {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 8px;
    color: #7F1D1D;
    font-size: 14px;
    margin: 12px 0;
}
.snap-error-retry-text { flex: 1; }
.snap-error-retry button {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #FCA5A5;
    border-radius: 6px;
    color: #7F1D1D;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.snap-error-retry button:hover { background: #FEE2E2; }

/* --- Onboarding tooltip popover --- */
.snap-onboard-pop {
    position: absolute;
    background: #1F2937;
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 280px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.25);
    z-index: 9999;
    animation: snaplot-onboard-pop-in 0.2s ease-out;
}
@keyframes snaplot-onboard-pop-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.snap-onboard-pop::before {
    content: '';
    position: absolute;
    top: -6px; left: 24px;
    width: 12px; height: 12px;
    background: #1F2937;
    transform: rotate(45deg);
}
.snap-onboard-pop-close {
    background: none; border: 0; color: #9CA3AF;
    font-size: 16px; cursor: pointer; padding: 0;
    margin-left: 8px;
}
.snap-onboard-pop button.snap-onboard-pop-cta {
    background: var(--snap-brown, #9A6E56);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

/* --- Focus-visible for a11y baseline --- */
.snap-input:focus-visible,
button:focus-visible,
.snap-topup-chip:focus-visible {
    outline: 2px solid var(--snap-brown, #9A6E56);
    outline-offset: 2px;
}
