/* Medical AI Processing System - Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    color: #2c5aa0;
}

#auth-section button {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

#auth-section button:hover {
    background: #1e3d6f;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#username {
    color: #2c5aa0;
    font-weight: 600;
    font-size: 14px;
}

#main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

#drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

#drop-zone:hover {
    border-color: #2c5aa0;
}

#drop-zone.dragover {
    border-color: #2c5aa0;
    background-color: #f0f7ff;
}

#file-input {
    display: none;
}

#chat-messages {
    height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
}

#chat-input-container {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#send-btn {
    background: #2c5aa0;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

#send-btn:hover {
    background: #1e3d6f;
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 4px;
}

.user-message {
    background: #e3f2fd;
    text-align: right;
}

.ai-message {
    background: #f5f5f5;
}

#upload-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Document Type Selection Styles */
#document-type-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

#document-type-section h3 {
    color: #2c5aa0;
    margin-bottom: 12px;
    font-size: 16px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: white;
    min-height: 60px;
}

.radio-option:hover {
    border-color: #2c5aa0;
    background: #f0f7ff;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 2px;
    accent-color: #2c5aa0;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked+.radio-label {
    color: #2c5aa0;
    font-weight: 600;
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #2c5aa0;
    background: #f0f7ff;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    line-height: 1.4;
}

.radio-label small {
    color: #6c757d;
    font-size: 12px;
    font-weight: normal;
    line-height: 1.3;
    margin-top: 2px;
}

/* Loading Spinner Styles */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 10px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Markdown Content Styles */
.markdown-content {
    background: white !important;
    padding: 15px !important;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #2c5aa0;
    margin-top: 15px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.markdown-content h1 {
    font-size: 24px;
    border-bottom: 2px solid #2c5aa0;
    padding-bottom: 10px;
}

.markdown-content h2 {
    font-size: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.markdown-content h3 {
    font-size: 18px;
}

.markdown-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.markdown-content ul,
.markdown-content ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.markdown-content li {
    margin-bottom: 5px;
    line-height: 1.5;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}

.markdown-content table th {
    background: #f0f7ff;
    color: #2c5aa0;
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    font-weight: 600;
}

.markdown-content table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.markdown-content table tr:nth-child(even) {
    background: #f9f9f9;
}

.markdown-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.markdown-content pre {
    background: #f4f4f4;
    padding: 12px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 10px 0;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 4px solid #2c5aa0;
    padding-left: 12px;
    margin-left: 0;
    color: #666;
    font-style: italic;
}

.markdown-content strong {
    color: #1e3d6f;
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}