/* Equipment Analyzer Custom Styles */

/* Use Bootstrap's CSS custom properties for consistent theming */
:root {
    --upload-border-color: var(--bs-border-color);
    --upload-hover-bg: var(--bs-secondary-bg);
    --feature-icon-size: 3rem;
}

/* Upload Area Styling */
.upload-area {
    position: relative;
    border: 2px dashed var(--upload-border-color);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    min-height: 200px;
}

.upload-area:hover {
    border-color: var(--bs-primary);
    background-color: var(--upload-hover-bg);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-placeholder {
    pointer-events: none;
}

.image-preview img {
    max-height: 300px;
    object-fit: contain;
}

/* Analysis Content Styling */
.analysis-content {
    line-height: 1.6;
}

.analysis-text {
    white-space: pre-line;
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Feature Icons */
.feature-icon {
    height: var(--feature-icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading States */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .upload-area {
        min-height: 150px;
    }
    
    .image-preview img {
        max-height: 200px;
    }
}

/* Print Styles */
@media print {
    .btn, .card-header, .border-top, .toast-container {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .analysis-text {
        border: 1px solid #000 !important;
        background-color: white !important;
        color: black !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .upload-area {
        border-width: 3px;
    }
    
    .analysis-text {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .upload-area {
        transition: none;
    }
    
    .spinner-border {
        animation: none;
    }
}

/* Focus styles for accessibility */
.upload-area:focus-within {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Custom scrollbar for analysis text */
.analysis-text::-webkit-scrollbar {
    width: 8px;
}

.analysis-text::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
    border-radius: 4px;
}

.analysis-text::-webkit-scrollbar-thumb {
    background: var(--bs-border-color);
    border-radius: 4px;
}

.analysis-text::-webkit-scrollbar-thumb:hover {
    background: var(--bs-secondary);
}
