/* Custom styles for Document Verification - Professional & Beautiful Design */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(45deg, var(--primary-color), #6610f2);
    --gradient-success: linear-gradient(45deg, var(--success-color), #20c997);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-success {
    background: var(--gradient-success) !important;
}

/* Card styling */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

/* File upload styling */
.form-control-lg, .form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.form-control-lg:focus, .form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Button styling */
.btn-lg {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 135, 84, 0.4);
}

.btn-light {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Progress bar */
.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

/* Table styling */
.table {
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.table-dark {
    background: linear-gradient(45deg, #495057, #6c757d);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: scale(1.001);
    transition: all 0.2s ease;
}

/* Status badges - Match reference implementation exactly */
.status-compliant, .badge.bg-success {
    background: linear-gradient(45deg, var(--success-color), #20c997) !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    display: inline-block;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(25, 135, 84, 0.3);
}

.status-non-compliant, .badge.bg-danger {
    background: linear-gradient(45deg, var(--danger-color), #e74c3c) !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    display: inline-block;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.3);
}

.status-partially-compliant, .badge.bg-warning {
    background: linear-gradient(45deg, var(--warning-color), #f39c12) !important;
    color: #212529 !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    display: inline-block;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
}

/* Score styling */
.score-high {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1em;
}

.score-medium {
    color: var(--warning-color);
    font-weight: bold;
    font-size: 1.1em;
}

.score-low {
    color: var(--danger-color);
    font-weight: bold;
    font-size: 1.1em;
}

/* Statistics cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.stat-card.compliant {
    border-left-color: var(--success-color);
}

.stat-card.non-compliant {
    border-left-color: var(--danger-color);
}

.stat-card.total {
    border-left-color: var(--primary-color);
}

.stat-card.average {
    border-left-color: var(--info-color);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paragraph text styling */
.paragraph-text {
    max-width: 400px;
    line-height: 1.5;
    font-size: 0.9em;
    color: #495057;
}

.paragraph-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .table-responsive {
        font-size: 0.85em;
    }

    .paragraph-text {
        max-width: 200px;
    }
}

/* Error styling */
.alert-danger {
    border-radius: 15px;
    border: none;
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-color), #6610f2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0b5ed7, #5a0fc7);
}

/* Tooltip styling */
.tooltip {
    font-size: 0.85rem;
}

.tooltip-inner {
    background: linear-gradient(45deg, #343a40, #495057);
    border-radius: 8px;
    padding: 8px 12px;
}

/* Upload area styling */
.upload-area {
    position: relative;
    border: 3px dashed #e9ecef;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

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

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

/* Progress section enhanced */
#progressSection {
    animation: fadeIn 0.5s ease forwards;
}

#progressSection .progress {
    height: 25px;
}

/* Results section enhanced */
#resultsSection {
    animation: fadeIn 0.5s ease forwards;
}

/* Summary stats grid */
#summaryStats .col-md-3 {
    margin-bottom: 15px;
}

/* Language selector icons */
.form-label i.fa-language {
    font-size: 1.1em;
}

/* Timer display */
#elapsedTime, #totalTime {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: bold;
}
