/* Custom styles for Legal Contract Review System */

/* Ensure footer stays at bottom */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Track changes styling */
.track-change-insertion {
    color: #2563eb;
    text-decoration: underline;
    background-color: #dbeafe;
}

.track-change-deletion {
    color: #dc2626;
    text-decoration: line-through;
    background-color: #fee2e2;
}

/* Section highlighting */
.section-highlight {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 0.5rem;
}

/* Custom scrollbar for content areas */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Drag and drop styling */
#dropZone.drag-over {
    border-color: #2563eb;
    background-color: #eff6ff;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Recommendation badges */
.recommendation-accept {
    background-color: #d1fae5;
    color: #065f46;
}

.recommendation-review {
    background-color: #fef3c7;
    color: #92400e;
}

.recommendation-reject {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Two-pane layout */
.two-pane-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    height: calc(100vh - 200px);
}

.pane {
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: white;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .two-pane-container {
        grid-template-columns: 1fr;
        height: auto;
    }
}

/* Code/legal text styling */
.legal-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    color: #1f2937;
}

/* Precedent match cards */
.precedent-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s;
}

.precedent-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Acceptance frequency bar */
.acceptance-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.acceptance-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #10b981, #059669);
    transition: width 0.3s ease;
}

/* 4-Tier Match Type Badges */
.match-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.match-badge-exact {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.match-badge-same-meaning {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.match-badge-similar {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.match-badge-no-match {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Analysis confidence meter */
.confidence-meter {
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.confidence-meter-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.confidence-high {
    background: linear-gradient(to right, #10b981, #059669);
}

.confidence-medium {
    background: linear-gradient(to right, #f59e0b, #d97706);
}

.confidence-low {
    background: linear-gradient(to right, #ef4444, #dc2626);
}

/* Risk assessment indicators */
.risk-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.risk-low {
    background-color: #d1fae5;
    color: #065f46;
}

.risk-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.risk-high {
    background-color: #fee2e2;
    color: #991b1b;
}
