/* Custom styles for KLIMS-API */

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

/* Tab styles */
.tab-button.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
}

.tab-button:not(.active) {
    border-bottom-color: transparent;
    color: #6b7280;
}

.tab-button:not(.active):hover {
    color: #374151;
    border-bottom-color: #d1d5db;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px solid #3b82f6;
}

/* Status badge styles */
.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-failed {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Card hover effects */
.bg-gray-50:hover {
    background-color: #f9fafb;
    transition: background-color 0.2s ease;
}

/* Button hover effects */
button:hover {
    transition: all 0.2s ease;
}

/* Modal overlay */
.modal-overlay {
    backdrop-filter: blur(4px);
}

/* Alert animations */
.alert-enter {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.alert-enter-active {
    transform: translateX(0);
}

.alert-exit {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

/* Responsive design enhancements */
@media (max-width: 640px) {
    .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .tab-button {
        font-size: 0.875rem;
        padding: 0.5rem 0.25rem;
    }
    
    .tab-button i {
        display: none;
    }
    
    .modal-container > div {
        width: 95% !important;
        margin: 1rem auto;
        top: 10px !important;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .bg-gray-50 {
        background-color: white !important;
        border: 1px solid #e5e7eb;
    }
}

/* Table column resize styles */
.resizable-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.resizable-table th {
    position: relative;
    min-width: 80px;
    overflow: visible;
    word-wrap: break-word;
    white-space: normal;
}

.resizable-table td {
    overflow: visible;
    word-wrap: break-word;
    white-space: normal;
    vertical-align: top;
}

.column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    border-right: 2px solid transparent;
    z-index: 10;
}

.column-resizer:hover {
    border-right-color: #3b82f6;
}

.column-resizer.resizing {
    border-right-color: #1d4ed8;
    background-color: rgba(59, 130, 246, 0.1);
}

.resizable-table th:last-child .column-resizer {
    display: none;
}

/* Resize handle visual indicator */
.column-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1px;
    width: 2px;
    height: 20px;
    background-color: #d1d5db;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.column-resizer:hover::after {
    opacity: 1;
}

/* Index column minimal width */
.index-column {
    width: 1% !important;
    white-space: nowrap !important;
    text-align: center !important;
    min-width: 40px !important;
    max-width: 60px !important;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}
