/* =================================================================
   Navajag Member Portal — shared styles
   Tailwind handles layout; this file covers motion, scrollbars,
   print rules and the few components Tailwind utilities cannot do.
 * ================================================================= */

/* ---- Notice ticker -------------------------------------------- */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 38s linear infinite;
}

.ticker-wrap:hover .ticker-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ---- Scrollbars ----------------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---- Flash messages ------------------------------------------- */
.flash-item {
    animation: flash-in 0.25s ease-out;
}

.flash-item.is-leaving {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes flash-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Password strength meter ---------------------------------- */
.strength-track {
    height: 4px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #ef4444;
    transition: width 0.25s ease, background-color 0.25s ease;
}

/* ---- Upload boxes --------------------------------------------- */
.upload-box.is-filled {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

/* ---- Sidebar (mobile) ----------------------------------------- */
#sidebarNav.is-collapsed {
    display: none;
}

@media (min-width: 1024px) {
    #sidebarNav.is-collapsed {
        display: flex;
    }
}

/* ---- Engagement letter / printing ----------------------------- */
@media print {
    /* Hide only the site chrome — never the letter sheet's own header/footer. */
    .no-print,
    body > header,
    body > footer,
    aside {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    main,
    .max-w-7xl {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #letterSheet {
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
        page-break-after: avoid;
    }

    /* Letterhead must always render in the printed letter. */
    #letterSheet header,
    #letterSheet footer {
        display: block !important;
    }

    #letterSheet img {
        display: block !important;
        visibility: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 auto !important;
        object-fit: contain !important;
    }
}
