/* BugTracker — app.css
   Các style bổ sung ngoài Tailwind CSS CDN.
   Giữ file tối giản — ưu tiên Tailwind utility classes.
*/

/* ===== HTMX indicators ===== */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline-block;
}
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* ===== Scrollbar tuỳ chỉnh ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar scrollbar màu tối hơn */
#sidebar ::-webkit-scrollbar-thumb {
    background: #4b5563;
}
#sidebar ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ===== Transition mượt cho HTMX swap ===== */
.htmx-swapping {
    opacity: 0;
    transition: opacity 150ms ease-out;
}
.htmx-settling {
    opacity: 1;
    transition: opacity 150ms ease-in;
}

/* ===== Focus visible — accessibility ===== */
:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* ===== Kanban drag & drop (SortableJS) ===== */
.sortable-ghost {
    opacity: 0.4;
    background: #e0f2fe;
    border: 2px dashed #0ea5e9;
    border-radius: 0.5rem;
}
.sortable-chosen {
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
    transform: rotate(1deg);
}
.sortable-drag {
    opacity: 1 !important;
}

/* ===== Badge pulse cho bug count mới ===== */
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.badge-pulse {
    animation: badge-pulse 2s ease-in-out infinite;
}

/* ===== Toast notification ===== */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slide-in 0.25s ease-out;
    max-width: 340px;
}
.toast-success { background: #22c55e; }
.toast-error   { background: #ef4444; }
.toast-info    { background: #0ea5e9; }
.toast-warn    { background: #f59e0b; }
@keyframes slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}
