/* Export CSS Styling */

/* Export Dropdown */
.export-dropdown {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.export-dropdown .dropdown-menu {
    min-width: 220px;
}

.export-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin: 0.125rem;
}

.export-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* Field Selection Grid */
.field-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.field-selection-grid .form-check {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease;
}

.field-selection-grid .form-check:hover {
    background-color: #f8f9fa;
}

.field-selection-grid .form-check-input:checked + .form-check-label {
    color: #0d6efd;
    font-weight: 500;
}

/* DEPRECATED - Export Preview styles removed */
/* .export-preview {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.export-preview table {
    font-size: 0.75rem;
    margin-bottom: 0;
}

.export-preview .table th {
    background-color: #e9ecef !important;
    font-weight: 600;
    border-top: 1px solid #dee2e6;
}

.export-preview .table td {
    padding: 0.25rem 0.5rem;
    border-top: 1px solid #dee2e6;
} */

/* Bulk Selection Counter */
.bulk-selection-counter {
    background-color: #0d6efd;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Selection Counter Alert */
#selectionCounter .alert {
    border-left: 4px solid #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.2);
}

#selectionCounter .btn {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Selected Row Highlighting */
.selected-row {
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-left: 3px solid #0d6efd;
}

.selected-row:hover {
    background-color: rgba(13, 110, 253, 0.15) !important;
}

/* Transaction Row Hover Effects */
.transaction-row {
    transition: all 0.2s ease;
}

.transaction-row:hover {
    background-color: rgba(0, 0, 0, 0.025);
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Export Progress */
.export-progress {
    height: 1.5rem;
    background-color: #e9ecef;
    border-radius: 0.375rem;
    overflow: hidden;
    margin: 1rem 0;
}

.export-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #6610f2);
    transition: width 0.3s ease;
    position: relative;
}

.export-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Modal Enhancements */
.modal-dialog.modal-lg {
    max-width: 900px;
}

.modal-header {
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Form Section Headers */
.modal-body h6.fw-bold {
    color: #495057;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    position: relative;
}

.modal-body h6.fw-bold::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #0d6efd;
}

/* Form Controls */
.form-select,
.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.form-select:focus,
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Button Styles */
.btn-success {
    background: linear-gradient(135deg, #198754, #20c997);
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.2s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #157347, #1ba085);
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

.btn:disabled {
    opacity: 0.65;
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-dialog.modal-lg {
        max-width: 95%;
        margin: 1rem auto;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .field-selection-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .export-dropdown .dropdown-menu {
        min-width: 180px;
    }
    
    #selectionCounter .alert {
        flex-direction: column;
        text-align: center;
    }
    
    #selectionCounter .btn {
        margin: 0.25rem;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .form-check {
        margin-bottom: 0.5rem;
    }
    
    .modal-header h5 {
        font-size: 1.1rem;
    }
    
    /* DEPRECATED - Preview styles removed */
    /* .export-preview {
        font-size: 0.75rem;
        max-height: 200px;
    } */
}

/* Print Styles */
@media print {
    .export-dropdown,
    .btn,
    .modal,
    #selectionCounter {
        display: none !important;
    }
    
    .selected-row {
        background-color: #f0f0f0 !important;
        border-left: 2px solid #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* DEPRECATED - Preview styles removed */
    /* .export-preview {
        background-color: #212529;
        border-color: #495057;
        color: #f8f9fa;
    } */
    
    .modal-content {
        background-color: #212529;
        color: #f8f9fa;
    }
    
    .modal-footer {
        background-color: #343a40;
        border-color: #495057;
    }
    
    .form-control,
    .form-select {
        background-color: #343a40;
        border-color: #495057;
        color: #f8f9fa;
    }
    
    .selected-row {
        background-color: rgba(13, 110, 253, 0.2) !important;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Accessibility Improvements */
.form-check-input:focus + .form-check-label {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .selected-row {
        background-color: #000 !important;
        color: #fff !important;
    }
    
    .btn-outline-primary {
        border-width: 2px;
    }
    
    /* DEPRECATED - Preview styles removed */
    /* .export-preview {
        border-width: 2px;
    } */
}