/* custom.css — Project Tracker (SRS-GOV-002)
   Minimal overrides — Tailwind covers 95% */

/* ── Spinner ──────────────────────────────────────────────────── */
.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #d4e6f1;
    border-top-color: #2471a3;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Nav tab active state ─────────────────────────────────────── */
.nav-tab {
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    transition: color 0.15s, background-color 0.15s;
    white-space: nowrap;
}

.nav-tab:hover {
    color: #1a5276;
    background-color: #eef5fa;
}

.nav-tab.active {
    color: #1a5276;
    background-color: #d4e6f1;
}

.nav-tab:focus-visible {
    outline: 2px solid #2471a3;
    outline-offset: 2px;
}

/* ── Detail panel slide-in ────────────────────────────────────── */
#detail-overlay.open {
    display: block;
}

#detail-overlay.open #detail-panel {
    transform: translateX(0);
}

#detail-overlay.open #detail-backdrop {
    opacity: 1;
}

/* ── Badge base ───────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ── Status badges ────────────────────────────────────────────── */
.badge-pending    { background: #f1f5f9; color: #64748b; }
.badge-active     { background: #dbeafe; color: #1d4ed8; }
.badge-in_progress { background: #dbeafe; color: #1d4ed8; }
.badge-completed  { background: #dcfce7; color: #15803d; }
.badge-blocked    { background: #fee2e2; color: #b91c1c; }
.badge-cancelled  { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }

/* ── Priority badges ──────────────────────────────────────────── */
.badge-mvp    { background: #dcfce7; color: #15803d; }
.badge-v2     { background: #dbeafe; color: #1d4ed8; }
.badge-future { background: #f1f5f9; color: #64748b; }

/* ── Impact/probability badges ────────────────────────────────── */
.badge-high   { background: #fee2e2; color: #b91c1c; }
.badge-medium { background: #fef3c7; color: #92400e; }
.badge-low    { background: #dcfce7; color: #15803d; }

/* ── Risk level badges ────────────────────────────────────────── */
.badge-open       { background: #fee2e2; color: #b91c1c; }
.badge-mitigated  { background: #fef3c7; color: #92400e; }
.badge-materialized { background: #fecaca; color: #991b1b; }
.badge-closed     { background: #dcfce7; color: #15803d; }

/* ── Comment type badges ──────────────────────────────────────── */
.badge-observation { background: #f1f5f9; color: #475569; }
.badge-blocker     { background: #fee2e2; color: #b91c1c; }
.badge-update      { background: #dbeafe; color: #1d4ed8; }
.badge-resolution  { background: #dcfce7; color: #15803d; }
.badge-escalation  { background: #fef3c7; color: #92400e; }

/* ── Table rows hover ─────────────────────────────────────────── */
.row-clickable {
    cursor: pointer;
    transition: background-color 0.1s;
}

.row-clickable:hover {
    background-color: #f8fafc;
}

/* ── Responsive: hide nav on mobile, show hamburger ───────────── */
@media (max-width: 767px) {
    #main-nav {
        position: fixed;
        top: 3.5rem;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid #e2e8f0;
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.25rem;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        z-index: 39;
    }

    #main-nav:not(.open) {
        display: none !important;
    }

    #main-nav.open {
        display: flex !important;
    }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .spinner,
    #detail-panel,
    #detail-backdrop,
    .nav-tab,
    .row-clickable {
        animation: none !important;
        transition: none !important;
    }
}
