/**
 * Tag Separator v2 - Custom Styles
 * Complements Tailwind CSS
 */

/* ============ AG GRID CUSTOMIZATIONS ============ */

/* Compact row height */
.ag-theme-alpine .ag-row,
.ag-theme-alpine-dark .ag-row {
    font-size: 13px;
}

.ag-theme-alpine .ag-cell,
.ag-theme-alpine-dark .ag-cell {
    padding-left: 12px;
    padding-right: 12px;
    display: flex;
    align-items: center;
}

.ag-theme-alpine .ag-header-cell,
.ag-theme-alpine-dark .ag-header-cell {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Missing row highlight */
.ag-theme-alpine .row-missing,
.ag-theme-alpine-dark .row-missing {
    background-color: rgba(251, 191, 36, 0.1) !important;
}

.ag-theme-alpine .row-missing:hover,
.ag-theme-alpine-dark .row-missing:hover {
    background-color: rgba(251, 191, 36, 0.15) !important;
}

/* Dark mode grid adjustments */
.ag-theme-alpine-dark {
    --ag-background-color: #1f2937;
    --ag-header-background-color: #111827;
    --ag-odd-row-background-color: #1f2937;
    --ag-row-hover-color: #374151;
    --ag-border-color: #374151;
    --ag-header-foreground-color: #9ca3af;
}

.ag-theme-alpine-dark .ag-header-cell {
    border-right-color: #374151;
}

.ag-theme-alpine-dark .ag-cell {
    border-right-color: #374151;
}

/* Cell content styling */
.ag-theme-alpine .font-medium,
.ag-theme-alpine-dark .font-medium {
    font-weight: 500;
}

/* Filter popup dark mode */
.ag-theme-alpine-dark .ag-popup {
    background-color: #1f2937;
    border-color: #374151;
}

.ag-theme-alpine-dark .ag-filter-toolpanel {
    background-color: #1f2937;
}

/* ============ SCROLLBAR STYLING ============ */

/* Webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

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

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ============ TRANSITIONS ============ */

.transition-colors {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ============ FOCUS STATES ============ */

input:focus,
select:focus,
button:focus {
    outline: none;
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* ============ MODAL BACKDROP ============ */

.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* ============ LOADING SPINNER ============ */

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============ UTILITY CLASSES ============ */

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============ RESPONSIVE ADJUSTMENTS ============ */

@media (max-width: 768px) {
    .ag-theme-alpine .ag-cell,
    .ag-theme-alpine-dark .ag-cell {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 12px;
    }
    
    .ag-theme-alpine .ag-header-cell,
    .ag-theme-alpine-dark .ag-header-cell {
        font-size: 11px;
    }
}

/* ============ PRINT STYLES ============ */

@media print {
    .no-print {
        display: none !important;
    }
    
    .ag-theme-alpine,
    .ag-theme-alpine-dark {
        height: auto !important;
    }
}
