/* LawyerLLM MONO - Pure Black & White Legal Aesthetics */

* {
    font-family: 'Space Mono', monospace;
}

/* Custom Scrollbar - Black & White Only */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: white;
    border: 1px solid black;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: black;
    border-radius: 0;
}

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

/* Layout Grid Lines - Subtle Structure */
.grid-bg {
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Typography Hierarchy */
.text-micro {
    font-size: 0.625rem; /* 10px */
    line-height: 0.875rem; /* 14px */
}

.text-legal {
    line-height: 1.7;
    letter-spacing: 0.025em;
}

/* Monospace Emphasis */
.mono-bold {
    font-weight: 700;
    letter-spacing: -0.025em;
}

.mono-tight {
    letter-spacing: -0.05em;
}

.mono-wide {
    letter-spacing: 0.1em;
}

/* Border Styles - Legal Document Aesthetics */
.border-legal {
    border: 2px solid black;
}

.border-legal-dashed {
    border: 2px dashed black;
}

.border-legal-double {
    border: 4px double black;
}

/* Document Cards */
.doc-card {
    border: 1px solid #ccc;
    transition: all 0.2s ease;
}

.doc-card:hover {
    border-color: black;
    box-shadow: 2px 2px 0 black;
    transform: translateY(-1px);
}

.doc-card.selected {
    background: black;
    color: white;
    border-color: black;
}

/* Button Styles */
.btn-mono {
    border: 2px solid black;
    background: white;
    color: black;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.btn-mono:hover {
    background: black;
    color: white;
}

.btn-mono:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

.btn-mono:disabled:hover {
    background: white;
    color: #ccc;
}

/* Icon Buttons */
.icon-btn {
    width: 32px;
    height: 32px;
    border: 1px solid black;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: black;
    color: white;
}

/* Chat Message Styling */
.chat-message {
    animation: slideUp 0.3s ease-out;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border: 2px solid black;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
}

.chat-avatar.ai {
    background: black;
    color: white;
}

/* Reference Tags */
.reference-tag {
    display: inline-block;
    border: 1px solid #ccc;
    padding: 4px 8px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 2px;
    background: white;
}

/* Form Elements */
.input-legal {
    border: 2px solid black;
    background: white;
    padding: 16px;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
}

.input-legal:focus {
    outline: none;
    box-shadow: inset 2px 2px 0 black;
}

.input-legal:disabled {
    background: #f5f5f5;
    border-color: #ccc;
    color: #666;
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #999;
    background: white;
    transition: all 0.2s ease;
}

.upload-zone:hover {
    border-color: black;
    background: #fafafa;
}

.upload-zone.dragover {
    border-color: black;
    background: #f0f0f0;
}

/* Modal Styling */
.modal-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(2px);
}

.modal-content {
    border: 4px solid black;
    background: white;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.2);
}

/* Panel Borders */
.panel-border {
    border-right: 2px solid black;
}

.panel-border-left {
    border-left: 2px solid black;
}

.panel-header {
    border-bottom: 2px solid black;
}

/* Status Indicators */
.status-active {
    background: black;
    color: white;
}

.status-inactive {
    background: white;
    border: 1px solid #ccc;
    color: #666;
}

/* Typography Effects */
.text-shadow-legal {
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.text-outline {
    -webkit-text-stroke: 1px black;
    -webkit-text-fill-color: white;
}

/* Animation Classes */
.animate-slideUp {
    animation: slideUp 0.3s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 0.2s ease-out;
}

.animate-pulse-dot {
    animation: pulseDot 1.4s ease-in-out infinite;
}

/* Loading States */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Utility Classes */
.border-t-legal {
    border-top: 2px solid black;
}

.border-b-legal {
    border-bottom: 2px solid black;
}

.border-l-legal {
    border-left: 2px solid black;
}

.border-r-legal {
    border-right: 2px solid black;
}

/* Selection Styling */
::selection {
    background: black;
    color: white;
}

::-moz-selection {
    background: black;
    color: white;
}

/* Focus States */
*:focus {
    outline: 2px solid black;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .no-print {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .border-gray-300 {
        border-color: black;
    }
    
    .text-gray-600 {
        color: black;
    }
    
    .bg-gray-100 {
        background: white;
        border: 1px solid black;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .panel-border {
        border-right: none;
        border-bottom: 2px solid black;
    }
    
    .panel-border-left {
        border-left: none;
        border-top: 2px solid black;
    }
}

/* Dark Mode Override - Force Light Mode */
@media (prefers-color-scheme: dark) {
    body {
        background: white !important;
        color: black !important;
    }
    
    * {
        background-color: white !important;
        color: black !important;
    }
    
    .bg-black {
        background: black !important;
        color: white !important;
    }
    
    .text-white {
        color: white !important;
    }
}

/* Legal Document Specific Styles */
.legal-section {
    border: 1px solid black;
    margin: 20px 0;
    padding: 16px;
}

.legal-section h3 {
    border-bottom: 1px solid black;
    padding-bottom: 8px;
    margin-bottom: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-numbered-list {
    counter-reset: legal-counter;
}

.legal-numbered-list li {
    counter-increment: legal-counter;
    margin: 12px 0;
    padding-left: 40px;
    position: relative;
}

.legal-numbered-list li::before {
    content: counter(legal-counter) ".";
    position: absolute;
    left: 0;
    font-weight: bold;
    width: 30px;
}

/* Citation Styling */
.citation {
    font-style: italic;
    border-left: 2px solid black;
    padding-left: 12px;
    margin: 16px 0;
}

.case-reference {
    font-weight: bold;
    text-decoration: underline;
}

/* Table Styling for Legal Documents */
.legal-table {
    border-collapse: collapse;
    width: 100%;
    border: 2px solid black;
}

.legal-table th,
.legal-table td {
    border: 1px solid black;
    padding: 12px;
    text-align: left;
}

.legal-table th {
    background: black;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Signature Lines */
.signature-line {
    border-bottom: 1px solid black;
    width: 200px;
    margin: 20px 0 8px 0;
    display: inline-block;
}

.signature-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Legal Seal/Stamp Area */
.legal-seal {
    border: 2px solid black;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    text-align: center;
    font-weight: bold;
}

/* Header Numbering for Legal Documents */
.legal-header {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 2px solid black;
    padding-bottom: 8px;
    margin: 24px 0 16px 0;
}

/* Emphasis Styles */
.legal-emphasis {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.legal-highlight {
    background: black;
    color: white;
    padding: 2px 4px;
}

/* Paragraph Styling */
.legal-paragraph {
    margin: 16px 0;
    line-height: 1.8;
    text-align: justify;
}

.legal-paragraph:first-letter {
    font-size: 1.2em;
    font-weight: bold;
}

/* Footer Styling */
.legal-footer {
    border-top: 2px solid black;
    margin-top: 40px;
    padding-top: 16px;
    font-size: 12px;
}

/* Watermark Effect */
.watermark {
    position: relative;
}

.watermark::before {
    content: "CONFIDENTIAL";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 48px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.1);
    z-index: -1;
    pointer-events: none;
}

/* Page Break Utilities */
.page-break-before {
    page-break-before: always;
}

.page-break-after {
    page-break-after: always;
}

.page-break-avoid {
    page-break-inside: avoid;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Links */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: black;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Error States */
.error-state {
    border: 2px solid black;
    background: white;
    color: black;
    padding: 16px;
}

.error-state::before {
    content: "⚠ ";
    font-weight: bold;
}

/* Success States */
.success-state {
    border: 2px solid black;
    background: black;
    color: white;
    padding: 16px;
}

.success-state::before {
    content: "✓ ";
    font-weight: bold;
}

/* Loading States */
.loading-state {
    border: 2px dashed black;
    background: white;
    padding: 16px;
    text-align: center;
}

/* Custom Checkbox Styling */
.legal-checkbox {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid black;
    background: white;
    margin-right: 8px;
    position: relative;
}

.legal-checkbox:checked {
    background: black;
}

.legal-checkbox:checked::after {
    content: "✓";
    color: white;
    position: absolute;
    top: -2px;
    left: 1px;
    font-size: 12px;
    font-weight: bold;
}

/* Radio Button Styling */
.legal-radio {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid black;
    border-radius: 50%;
    background: white;
    margin-right: 8px;
    position: relative;
}

.legal-radio:checked {
    background: black;
}

.legal-radio:checked::after {
    content: "";
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
}

/* Utility Classes for Legal Formatting */
.indent-1 { margin-left: 20px; }
.indent-2 { margin-left: 40px; }
.indent-3 { margin-left: 60px; }
.indent-4 { margin-left: 80px; }

.line-height-legal { line-height: 1.8; }
.line-height-tight { line-height: 1.4; }
.line-height-loose { line-height: 2.0; }

/* End of MONO Legal Stylesheet */