/**
 * LawSave - Deep Navy Blue & White Theme
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #0B2A4A;
    --navy-dark: #061e35;
    --navy-light: #1e3a5f;
    --white: #FFFFFF;
    --bg: #FFFFFF;
    --bg-alt: #f8f9fa;
    --text: #0B2A4A;
    --text-muted: #2d4a6b;
    --border: #c5d0de;
    --primary-color: #0B2A4A;
    --primary-dark: #061e35;
    --bg-color: #f8f9fa;
    --card-bg: #FFFFFF;
    --text-primary: #0B2A4A;
    --text-secondary: #2d4a6b;
    --border-color: #c5d0de;
    --shadow: 0 1px 3px 0 rgba(11, 42, 74, 0.08), 0 1px 2px 0 rgba(11, 42, 74, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(11, 42, 74, 0.1), 0 4px 6px -2px rgba(11, 42, 74, 0.06);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header { text-align: center; margin-bottom: 3rem; }

.header-actions {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.language-selector { position: relative; }

.language-dropdown {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230B2A4A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 0.2s;
    min-width: 150px;
}

.language-dropdown:hover,
.language-dropdown:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 2px rgba(11, 42, 74, 0.15);
}

.pricing-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--navy);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    border: 2px solid var(--navy);
    transition: all 0.2s;
}

.pricing-link:hover {
    background: var(--navy);
    color: var(--white);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

main {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.input-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-weight: 600;
}

.input-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
    font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    resize: vertical;
    min-height: 300px;
    color: var(--text);
    background: var(--white);
}

textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 2px rgba(11, 42, 74, 0.1);
}

.file-upload-area {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-alt);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--navy);
    background: rgba(11, 42, 74, 0.04);
}

.upload-placeholder svg { color: var(--text-muted); }
.upload-placeholder p { margin: 0.5rem 0; color: var(--text); }

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(11, 42, 74, 0.06);
    border-radius: 6px;
    margin-top: 1rem;
}

#file-name { color: var(--navy); font-weight: 500; }

.remove-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--navy);
    cursor: pointer;
    padding: 0 0.5rem;
}

.remove-btn:hover { color: var(--navy-dark); }

.analyze-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.analyze-btn:hover:not(:disabled) {
    background: var(--navy-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.results-section { margin-top: 2rem; }

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header h2 {
    font-size: 1.5rem;
    color: var(--text);
}

.new-analysis-btn {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid var(--navy);
    border-radius: 6px;
    color: var(--navy);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.new-analysis-btn:hover {
    background: var(--navy);
    color: var(--white);
}

.analysis-output {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
}

.analysis-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.analysis-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--navy);
    color: var(--white);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.analysis-output ul, .analysis-output ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.analysis-output li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.modern-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-alt);
    border-radius: 8px;
    border-left: 3px solid var(--border);
    transition: all 0.2s;
}

.modern-list-item:hover {
    border-left-color: var(--navy);
}

.error-section { margin-top: 2rem; }

.error-box {
    background: rgba(11, 42, 74, 0.08);
    border: 2px solid var(--navy);
    border-radius: 8px;
    padding: 1.5rem;
}

.error-box h3 { color: var(--navy); }
.error-box p { color: var(--text); }

footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Severity - all navy/white */
.severity-high,
.severity-medium,
.severity-low {
    color: var(--navy);
}

/* Points of Attention - navy & white */
.points-of-attention-section {
    background: var(--navy);
    border: 1px solid var(--navy-dark);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.points-of-attention-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin: 0 0 0.5rem 0;
}

.points-of-attention-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
}

.attention-point {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--navy);
}

.attention-point.critical,
.attention-point.high {
    border-left-color: var(--navy);
}

.attention-point-action {
    background: var(--bg-alt);
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 2px solid var(--navy);
    font-size: 0.875rem;
}

.attention-point-action strong { color: var(--navy); }

/* Red Flags - navy & white */
.red-flags-alert {
    background: var(--navy);
    border: 1px solid var(--navy-dark);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.red-flags-alert-header h2 {
    margin: 0 0 0.5rem 0;
    color: var(--white);
    font-size: 1.125rem;
    font-weight: 600;
}

.red-flags-alert-header p { color: rgba(255, 255, 255, 0.9); }

.flag-count {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.flag-count.high,
.flag-count.medium,
.flag-count.low {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.review-red-flags-btn {
    background: var(--white);
    color: var(--navy);
    border: 2px solid var(--white);
    padding: 0.625rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.review-red-flags-btn:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-1px);
}

.red-flag-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.red-flag-header {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    background: var(--bg-alt);
}

.red-flag-severity.severity-high,
.red-flag-severity.severity-medium,
.red-flag-severity.severity-low {
    background: var(--navy);
    color: var(--white);
}

.red-flag-actions {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--navy);
}

.ai-smart-reply-section {
    background: rgba(11, 42, 74, 0.06);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.ai-smart-reply-header strong { color: var(--navy); }

.copy-reply-btn {
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    cursor: pointer;
    font-weight: 500;
}

.copy-reply-btn:hover {
    background: var(--navy-dark);
}

.verdict-low,
.verdict-medium,
.verdict-high {
    background: var(--navy);
    color: var(--white);
    border: 2px solid var(--navy-dark);
}

.faq-item { transition: all 0.3s ease; }
.faq-question { cursor: pointer; user-select: none; }
.faq-question:hover {
    background-color: rgba(11, 42, 74, 0.06);
}

.file-hint { font-size: 0.875rem; color: var(--text-muted); }
.list-item-icon { color: var(--text-muted); flex-shrink: 0; }
.list-item-content { flex: 1; color: var(--text); }
.red-flags-review-section { margin-top: 1rem; }
.red-flag-title { display: flex; align-items: center; gap: 1rem; flex: 1; }
.red-flag-details {
    padding: 1.25rem;
    background: var(--white);
    border-top: 1px solid var(--border);
}
.red-flag-consequence strong { color: var(--text); }
.red-flag-consequence p { margin: 0; color: var(--text-muted); }
.ai-smart-reply-content {
    background: var(--white);
    border-radius: 6px;
    padding: 1.25rem;
    color: var(--text);
    line-height: 1.7;
    border: 1px solid var(--border);
}
.verdict-box {
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 0.75rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

@media (max-width: 768px) {
    .container { padding: 1rem 0.5rem; }
    header h1 { font-size: 2rem; }
    main { padding: 1.5rem; }
}
