/* Custom styles for Sr Judge Track */
/* Tailwind base styles are loaded from tailwind-output.css */

/* ===== MODAL STYLES (Tailwind-based) ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    z-index: 51;
    width: 100%;
    max-width: 28rem;
    margin: 1rem;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background-color: #f9fafb;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* ===== NAVIGATION STYLES ===== */

/* Desktop Header Navigation Links - Pixel Perfect Alignment */
.header-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    height: 40px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: #334155;
    background-color: transparent;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

.header-nav-link:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

/* Material Icons within navigation links */
.header-nav-link .material-icons {
    font-size: 20px !important;
    width: 20px;
    height: 20px;
    line-height: 20px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Text spans within navigation links */
.header-nav-link > span:not(.material-icons) {
    display: inline-block;
    line-height: 1.25rem;
    vertical-align: middle;
}

/* Expand/dropdown arrow icon */
.header-nav-link .material-icons.expand-icon {
    font-size: 16px !important;
    width: 16px;
    height: 16px;
    margin-left: 0.125rem;
}

/* Dropdown Menu Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #eff6ff;
    color: #2563eb;
}

.dropdown-item .material-icons {
    font-size: 18px !important;
    width: 18px;
    height: 18px;
    line-height: 18px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Mobile Navigation Links */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: #334155;
    border-left: 4px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background-color: #eff6ff;
    color: #2563eb;
    border-left-color: #2563eb;
}

.mobile-nav-link .material-icons {
    font-size: 20px !important;
    width: 20px;
    height: 20px;
    line-height: 20px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== FORM ELEMENTS ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
select,
textarea {
    @apply block w-full px-4 py-2.5 border border-nv-gray-300 rounded-lg shadow-sm focus:outline-none focus:ring-2 focus:ring-nv-blue-500 focus:border-transparent transition-all duration-200;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button,
input[type="submit"],
input[type="button"] {
    @apply bg-gradient-to-r from-nv-blue-600 to-nv-blue-700 hover:from-nv-blue-700 hover:to-nv-blue-800 text-white font-medium py-2.5 px-6 rounded-lg transition-all duration-200 cursor-pointer shadow-md hover:shadow-lg;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    transform: translateY(-1px);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active {
    transform: translateY(0);
}

/* Enhanced card styles */
.card {
    @apply bg-white rounded-xl shadow-md hover:shadow-xl transition-shadow duration-300 border border-nv-gray-100;
}

/* Legacy styles for backward compatibility */
.override_screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.override_child {
    @apply bg-white rounded-xl shadow-2xl;
    width: 90%;
    max-width: 800px;
    height: 90%;
    margin: 2.5% auto;
    padding: 2rem;
    overflow-y: auto;
}

.error {
    @apply text-red-600 text-sm block mt-1.5;
}

/* Utility classes */
.centered-div {
    @apply w-full mx-auto p-6;
}

.primary_background {
    @apply bg-white;
}

/* ===== MATERIAL ICONS GLOBAL SETUP ===== */
.material-icons {
    font-family: 'Material Icons' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;  /* Default size */
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    user-select: none;
}

/* Custom dropdown for legacy support */
.nav-dropdown .dropdown-content {
    display: none;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

/* Font family */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced animations */
@keyframes slideDown {
    from {
        transform: translateY(-1rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

#notif-success {
    animation: slideDown 0.4s ease-out;
}

/* Page transitions */
main {
    animation: fadeIn 0.3s ease-in;
}

/* Enhanced hover effects for cards */
.category-card,
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover,
.card-hover:hover {
    transform: translateY(-4px) scale(1.01);
}

/* Responsive table wrapper */
.table-responsive {
    @apply overflow-x-auto shadow-lg rounded-xl border border-nv-gray-100;
}

table {
    @apply min-w-full divide-y divide-nv-gray-200;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.4;
    }
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}

thead {
    @apply bg-nv-gray-50;
}

th {
    @apply px-6 py-3 text-left text-xs font-medium text-nv-gray-700 uppercase tracking-wider;
}

td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-nv-gray-900;
}

tbody {
    @apply bg-white divide-y divide-nv-gray-200;
}

tr:hover {
    @apply bg-nv-gray-50;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    @apply bg-nv-gray-100;
}

::-webkit-scrollbar-thumb {
    @apply bg-nv-gray-400 rounded;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-nv-gray-500;
}
