/* AI Checker Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: white;
    padding: 100px 0;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
}

.hero-section .lead {
    font-size: 1.4rem;
    opacity: 0.9;
}

/* Feature Cards */
.feature-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Dashboard Cards */
.stat-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Document/Sample Cards */
.item-card {
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: border-color 0.2s;
}

.item-card:hover {
    border-color: #0d6efd;
}

.item-card .card-title {
    font-size: 1rem;
    font-weight: 600;
}

/* Audit Results */
.result-item {
    border-left: 4px solid;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.result-item.severity-error {
    border-left-color: var(--danger-color);
}

.result-item.severity-warning {
    border-left-color: var(--warning-color);
}

.result-item.severity-info {
    border-left-color: var(--info-color);
}

.result-item .excerpt {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.result-item .excerpt .highlight {
    background-color: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

/* Voice Score */
.voice-score {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto;
}

.voice-score.high {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.voice-score.medium {
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
}

.voice-score.low {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Progress Bar */
.audit-progress {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    background: #e9ecef;
}

.audit-progress .progress-bar {
    transition: width 0.3s ease;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #0d6efd;
    background: #f8f9fa;
}

.upload-zone i {
    font-size: 3rem;
    color: #6c757d;
}

/* Badges */
.badge-check-type {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Form Styling */
.form-control:focus,
.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 2rem;
}

/* Tables */
.table th {
    font-weight: 600;
    background: #f8f9fa;
}

/* Empty State */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner 0.75s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .stat-card .stat-value {
        font-size: 2rem;
    }
}

/* Utility Classes */
.cursor-pointer {
    cursor: pointer;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action Buttons for Results */
.result-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.result-item.actioned {
    opacity: 0.6;
}

.result-item.accepted {
    background: #d4edda;
}

.result-item.rejected {
    background: #f8f9fa;
    text-decoration: line-through;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 0;
}

.mode-selector .btn {
    flex: 1;
    padding: 1rem;
    border-radius: 0;
}

.mode-selector .btn:first-of-type {
    border-radius: 8px 0 0 8px;
}

.mode-selector .btn:last-of-type {
    border-radius: 0 8px 8px 0;
}

.mode-selector .btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.mode-selector .btn-check:checked + .btn .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.mode-selector .btn i {
    opacity: 0.8;
}

.mode-selector .btn-check:checked + .btn i {
    opacity: 1;
}

/* AI Likelihood Gauge */
.ai-gauge-container {
    margin: 0 auto;
    max-width: 200px;
}

.ai-gauge {
    display: block;
    margin: 0 auto;
}

.ai-gauge-score {
    font-size: 2rem;
    font-weight: 700;
    fill: currentColor;
}

.ai-gauge-label {
    font-size: 0.75rem;
    fill: #6c757d;
    font-weight: 500;
}

/* Statistical Metrics */
.stat-metric {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    height: 100%;
}

.stat-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-metric-label {
    font-size: 0.875rem;
    color: #495057;
    margin-top: 0.25rem;
}

.stat-metric-detail {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Results Accordion */
.results-accordion .accordion-item {
    border: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
    border-radius: 8px !important;
    overflow: hidden;
}

.results-accordion .accordion-button {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    background: #fff;
}

.results-accordion .accordion-button:not(.collapsed) {
    background: #f8f9fa;
    box-shadow: none;
}

.results-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.results-accordion .accordion-body {
    padding: 0;
}

.results-accordion .results-list {
    padding: 0;
}

.results-accordion .result-item {
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid #e9ecef;
}

.results-accordion .result-item:last-child {
    border-bottom: none;
}

/* Responsive Mode Selector */
@media (max-width: 576px) {
    .mode-selector {
        flex-direction: column;
    }

    .mode-selector .btn {
        border-radius: 0 !important;
    }

    .mode-selector .btn:first-of-type {
        border-radius: 8px 8px 0 0 !important;
    }

    .mode-selector .btn:last-of-type {
        border-radius: 0 0 8px 8px !important;
    }

    .stat-metric-value {
        font-size: 1.5rem;
    }
}

/* Accordion Badge Spacing */
.results-accordion .accordion-button .badge {
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
}
