/**
 * Optical Template Analyzer Styles - Inline Version
 * Bootstrap 3 + Metronic 4 Compatible
 * @author selcukmart <admin@hostingdevi.com>
 * 07.11.2025
 */

/* Main Container */
#opticalAnalyzerContainer {
    margin-top: 30px;
}

#opticalAnalyzerContainer .portlet {
    margin-bottom: 0;
}

/* Portlet Header */
#opticalAnalyzerContainer .portlet-title {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

#opticalAnalyzerContainer .portlet-title:hover {
    background-color: #f5f5f5;
}

#opticalAnalyzerContainer .portlet-title .caption {
    line-height: 36px;
}

#opticalAnalyzerContainer .portlet-title .tools {
    margin-top: 10px;
}

/* Form Elements */
#opticalAnalyzerContainer .form-group {
    margin-bottom: 20px;
}

#opticalAnalyzerContainer .control-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

#opticalAnalyzerContainer .required {
    color: #e73d4a;
    font-weight: bold;
}

#opticalAnalyzerContainer .form-control {
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

#opticalAnalyzerContainer .form-control:focus {
    border-color: #32c5d2;
    box-shadow: 0 0 0 0.2rem rgba(50, 197, 210, 0.25);
}

#opticalAnalyzerContainer .help-block {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    margin-bottom: 0;
}

/* Alert Styles */
#opticalAnalyzerContainer .alert {
    border-radius: 4px;
    margin-bottom: 15px;
}

#opticalAnalyzerContainer .alert-info {
    background-color: #e1f5fe;
    border-color: #b3e5fc;
    color: #0277bd;
}

#opticalAnalyzerContainer .alert-success {
    background-color: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

#opticalAnalyzerContainer .alert-danger {
    background-color: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
}

#opticalAnalyzerContainer .alert i {
    margin-right: 8px;
}

/* Progress Bar */
#progressContainer {
    margin: 20px 0;
}

#progressContainer .progress {
    height: 25px;
    background-color: #f5f5f5;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

#progressContainer .progress-bar {
    line-height: 25px;
    font-size: 12px;
    font-weight: 600;
    transition: width 0.6s ease;
}

#progressContainer .text-muted {
    font-size: 13px;
    margin: 0;
}

#progressContainer .fa-spinner {
    margin-right: 8px;
}

/* Results Container */
#resultsContainer {
    animation: slideDown 0.3s ease-out;
}

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

/* Summary Wells */
#resultsContainer .well {
    margin-bottom: 0;
}

#resultsContainer .well strong {
    color: #333;
}

/* Table Styles */
#resultsContainer .table {
    margin-bottom: 0;
    font-size: 13px;
}

#resultsContainer .table-scrollable {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
}

#resultsContainer .table thead tr th {
    background-color: #32c5d2;
    color: #ffffff;
    font-weight: 600;
    border: none;
    padding: 12px 8px;
    vertical-align: middle;
    position: sticky;
    top: 0;
    z-index: 10;
}

#resultsContainer .table tbody tr td {
    padding: 10px 8px;
    vertical-align: middle;
    border-color: #e5e5e5;
}

#resultsContainer .table-hover tbody tr:hover {
    background-color: #f5f5f5;
}

#resultsContainer .table tbody tr td code.analyzer-code {
    background-color: #f8f9fa;
    color: #e73d4a;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    border: 1px solid #e5e5e5;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#resultsContainer .label {
    font-size: 11px;
    padding: 4px 8px;
    font-weight: 600;
}

#resultsContainer .badge {
    background-color: #32c5d2;
    font-size: 11px;
    padding: 4px 8px;
    font-weight: 600;
}

#resultsContainer .badge-default {
    background-color: #95a5a6;
}

/* Button Styles */
#analyzeButton {
    padding: 10px 30px;
    font-weight: 600;
}

#analyzeButton i {
    margin-right: 8px;
}

#clearResultsBtn {
    font-weight: 600;
}

#clearResultsBtn i {
    margin-right: 5px;
}

/* Upload Section */
#uploadSection {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    border: 2px dashed #e5e5e5;
    margin-bottom: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #opticalAnalyzerContainer {
        margin-top: 20px;
    }
    
    #resultsContainer .table-scrollable {
        max-height: 300px;
    }
    
    #resultsContainer .table {
        font-size: 11px;
    }
    
    #resultsContainer .table thead tr th,
    #resultsContainer .table tbody tr td {
        padding: 8px 5px;
    }
    
    #uploadSection {
        padding: 15px;
    }
}

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

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

/* Smooth Transitions */
.alert,
.progress,
#resultsContainer,
#errorContainer,
#progressContainer,
#uploadSection {
    transition: all 0.3s ease;
}

/* Custom Scrollbar for Results */
#resultsContainer .table-scrollable::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#resultsContainer .table-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#resultsContainer .table-scrollable::-webkit-scrollbar-thumb {
    background: #32c5d2;
    border-radius: 4px;
}

#resultsContainer .table-scrollable::-webkit-scrollbar-thumb:hover {
    background: #26a1ab;
}

/* Collapse Icon Animation */
.portlet-title .tools .fa {
    transition: transform 0.3s ease;
}

/* Sticky Header for Table */
@supports (position: sticky) {
    #resultsContainer .table thead tr th {
        position: sticky;
        top: 0;
    }
}
