/* ── Animations ── */
@keyframes fade-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .7; }
}

.animate-fade-in { animation: fade-in .5s ease-out both; }

/* ── Spinner ── */
.spinner {
    width: 22px; height: 22px;
    border: 3px solid #e5e7eb; border-top-color: #6366f1;
    border-radius: 50%; animation: spin .7s linear infinite;
}

/* ── Toast ── */
.toast-show  { transform: translateX(0) !important; }
.toast-hide  { transform: translateX(120%) !important; }
.toast-error   #toastInner { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.toast-error   #toastIcon  { color: #ef4444; }
.toast-success #toastInner { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.toast-success #toastIcon  { color: #22c55e; }
.toast-info    #toastInner { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.toast-info    #toastIcon  { color: #3b82f6; }

/* ── Buttons disabled ── */
#downloadBtn:disabled, #parseBtn:disabled {
    opacity: .65; cursor: not-allowed; pointer-events: none;
}

/* ── Progress bar animation ── */
#progressBar { transition: width .4s ease; }
#progressSection.pulse-bar #progressBar { animation: progress-pulse 1.5s ease-in-out infinite; }

/* ── Auth panel ── */
#authPanel { transition: transform .3s cubic-bezier(.4,0,.2,1); }

/* ── Pricing modal ── */
#pricingModal { transition: opacity .2s ease; }
#pricingModal > div { animation: fade-in .25s ease-out both; }

/* ── Line clamp ── */
.line-clamp-2 {
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::selection { background: rgba(99,102,241,.2); }

html { scroll-behavior: smooth; }
