/*
 * Wingman Fantasy — shared base styles
 *
 * These styles are shared across every page (index, draft, preflight, calendar,
 * dashboard). Page-specific styles stay in their own <style> blocks for now;
 * we'll factor more out as patterns emerge.
 *
 * Loaded BEFORE Tailwind's CDN script so Tailwind's resets don't clobber us.
 */

body {
    font-family: 'Inter', sans-serif;
    background-color: #121826;
    color: #f9fafb;
}

.main-content {
    padding-bottom: 6rem;
    /* Reserve room for the fixed footer */
}

.card {
    background-color: #1f2937;
    border: 1px solid #374151;
}

.btn-primary {
    background-color: #3b82f6;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.loader {
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}

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

/* ── Shared toast notification (used by drToast and any future wfToast) ── */
.wf-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.wf-toast {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-size: 0.875rem;
    max-width: 320px;
    pointer-events: auto;
    animation: wf-toast-slide 0.2s ease-out;
}

@keyframes wf-toast-slide {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ── Shared user chip (avatar + display name) for top of dashboard pages ── */
.wf-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 999px;
    font-size: 0.875rem;
}

.wf-user-chip img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #374151;
}

/* ──────────────────────────────────────────────────────────────────────
 * Tier B.1 — Sticky horizontal nav bar
 *
 * Renders at the top of every page. Right-aligned content (links + chip).
 * Mobile: links collapse into a compact row, chip stays right-aligned.
 * ──────────────────────────────────────────────────────────────────────*/
.wf-nav {
    position: sticky;
    top: 0;
    z-index: 90;
    background-color: rgba(18, 24, 38, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1f2937;
    padding: 0.625rem 1rem;
    margin: -1rem -1rem 1.25rem -1rem; /* bleed to page edges, offset body padding */
}
@media (min-width: 768px) {
    .wf-nav { margin: -2rem -2rem 1.5rem -2rem; }
}

.wf-nav-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 72rem;
    margin: 0 auto;
}

.wf-nav-brand {
    font-weight: 700;
    color: #f9fafb;
    text-decoration: none;
    font-size: 0.9375rem;
    white-space: nowrap;
    /* Brand pushes to the left; everything else right-aligns. */
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.wf-nav-brand .wf-nav-brand-mark {
    font-size: 1.1rem;
}

.wf-nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.wf-nav-link {
    color: #9ca3af;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    transition: color 0.15s, background-color 0.15s;
    white-space: nowrap;
}
.wf-nav-link:hover {
    color: #f9fafb;
    background-color: rgba(55, 65, 81, 0.5);
}
.wf-nav-link.is-active {
    color: #93c5fd;
    background-color: rgba(30, 58, 138, 0.35);
}

/* The chip sits to the right of the nav links. Spacing handles mobile too. */
.wf-nav-chip {
    margin-left: 0.5rem;
}

/* On very small screens, drop the brand text to icon-only and tighten link padding */
@media (max-width: 480px) {
    .wf-nav-brand span:not(.wf-nav-brand-mark) { display: none; }
    .wf-nav-link { padding: 0.375rem 0.5rem; font-size: 0.75rem; }
}
