/* ==========================================================================
   Custom CSS - MPS Concrete Solutions
   Minimal overrides; Tailwind handles the majority of styling.
   ========================================================================== */

/* ---- Animations ---- */

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.2s ease-out forwards;
}

.animate-fadeOut {
    animation: fadeOut 0.3s ease-in forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.3s ease-out forwards;
}

/* ---- Modal backdrop transition ---- */

#modal {
    transition: opacity 0.2s ease;
    opacity: 0;
}

/* ---- Focus styles (primary = blue-600) ---- */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb; /* blue-600 */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ---- Table striped rows ---- */

table tbody tr:nth-child(even) {
    background-color: #f9fafb; /* gray-50 */
}

table tbody tr:hover {
    background-color: #f3f4f6; /* gray-100 */
}

/* ---- Custom scrollbar ---- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* ---- Print styles ---- */

@media print {
    /* Hide navigation, sidebar, action buttons */
    nav,
    aside,
    .no-print,
    #toast-container,
    #modal,
    button,
    .print\\:hidden {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    /* Ensure content fills page width */
    main,
    .print-area {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Avoid page breaks inside cards / tables */
    .card,
    table,
    tr {
        break-inside: avoid;
    }

    /* Remove shadows and borders for cleaner print */
    .shadow,
    .shadow-sm,
    .shadow-md,
    .shadow-lg {
        box-shadow: none !important;
    }

    a {
        text-decoration: none;
        color: black;
    }

    /* Show URLs after links in print */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
