/* Image Analysis Styles */

.image-analysis-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
}

.image-upload-area {
    border: 2px dashed #ffffff80;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

.image-upload-area:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.image-upload-area.dragover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.2);
}

.image-preview-card {
    transition: transform 0.2s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.image-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.confidence-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.confidence-high {
    background-color: #28a745;
}

.confidence-medium {
    background-color: #ffc107;
}

.confidence-low {
    background-color: #dc3545;
}

.mapping-select {
    min-width: 150px;
}

.analysis-results {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.account-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.account-table th {
    background: #343a40;
    color: white;
    border: none;
    font-weight: 600;
}

.account-table td {
    vertical-align: middle;
    border-color: #dee2e6;
}

.account-amount {
    font-weight: 600;
    color: #28a745;
}

.account-institution {
    color: #6c757d;
    font-size: 0.9em;
}

.ai-features-list {
    list-style: none;
    padding: 0;
}

.ai-features-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-features-list li:last-child {
    border-bottom: none;
}

.ai-features-list i {
    width: 20px;
    margin-right: 10px;
}

.processing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.processing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

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

.upload-tips {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.upload-tips h6 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.upload-tips ul {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.9);
}

.upload-tips li {
    margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-analysis-container {
        padding: 1rem;
    }
    
    .image-upload-area {
        padding: 1rem;
    }
    
    .mapping-select {
        min-width: 120px;
        font-size: 0.9em;
    }
    
    .account-table {
        font-size: 0.9em;
    }
}

/* Dark theme compatibility */
[data-bs-theme="dark"] .analysis-results {
    background: #2d3748;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .account-table {
    background: #1a202c;
}

[data-bs-theme="dark"] .account-table td {
    border-color: #4a5568;
}

[data-bs-theme="dark"] .account-amount {
    color: #68d391;
}

[data-bs-theme="dark"] .account-institution {
    color: #a0aec0;
}

/* Editable Fields Styles */
.editable-field {
    position: relative;
}

.editable-field input,
.editable-field select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

.editable-field input:focus,
.editable-field select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.editable-field input:hover,
.editable-field select:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.1rem rgba(0, 123, 255, 0.15);
}

.institution-input:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Amount field specific styling */
.editable-field input[type="number"],
.editable-field .currency-input {
    text-align: right;
    font-weight: 600;
    color: #28a745;
    font-family: 'Courier New', monospace;
}

.currency-input {
    position: relative;
}

.currency-input::before {
    content: '$';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-weight: normal;
    pointer-events: none;
}

.currency-input {
    padding-left: 20px !important;
}

/* Type field specific styling */
.editable-field select {
    min-width: 120px;
    cursor: pointer;
}

/* Dark theme for editable fields */
[data-bs-theme="dark"] .editable-field input,
[data-bs-theme="dark"] .editable-field select {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .editable-field input:focus,
[data-bs-theme="dark"] .editable-field select:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 0.2rem rgba(49, 130, 206, 0.25);
}

[data-bs-theme="dark"] .editable-field input[type="number"],
[data-bs-theme="dark"] .editable-field .currency-input {
    color: #68d391;
}

[data-bs-theme="dark"] .currency-input::before {
    color: #a0aec0;
}

/* Responsive adjustments for editable fields */
@media (max-width: 768px) {
    .editable-field input,
    .editable-field select {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .editable-field select {
        min-width: 100px;
    }
}

/* Institution Autocomplete Styles */
.institution-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #007bff;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
}

.institution-autocomplete-list .autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: #212529;
    font-weight: 500;
}

.institution-autocomplete-list .autocomplete-item:hover {
    background-color: #f8f9fa;
    color: #000;
    font-weight: 600;
}

.institution-autocomplete-list .autocomplete-item:last-child {
    border-bottom: none;
}

.institution-autocomplete-list .autocomplete-item.selected {
    background-color: #007bff !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Dark theme for autocomplete */
[data-bs-theme="dark"] .institution-autocomplete-list {
    background: #1a202c;
    border-color: #3182ce;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-bs-theme="dark"] .institution-autocomplete-list .autocomplete-item {
    border-bottom-color: #2d3748;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .institution-autocomplete-list .autocomplete-item:hover {
    background-color: #2d3748;
    color: #ffffff;
}

[data-bs-theme="dark"] .institution-autocomplete-list .autocomplete-item.selected {
    background-color: #3182ce !important;
    color: #ffffff !important;
} 