/**
 * RepuScore — Custom Styles
 * Supplements Tailwind CDN with project-specific overrides.
 */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better focus rings */
:focus-visible {
    outline: 2px solid #054863;
    outline-offset: 2px;
}

/* Custom scrollbar (WebKit) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Table row hover transition */
tbody tr {
    transition: background-color 0.1s ease;
}

/* Sidebar active indicator */
aside nav a.active-nav::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #43D828;
    border-radius: 0 2px 2px 0;
}

/* Flash message auto-dismiss animation */
@keyframes flashFadeOut {
    0% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.flash-auto-dismiss {
    animation: flashFadeOut 5s ease forwards;
}

/* Loading spinner for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Print styles */
@media print {
    aside, header, .no-print {
        display: none !important;
    }
    main {
        margin: 0 !important;
        padding: 0 !important;
    }
}
