/* Base Layout */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Button Styles */
.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.button {
    background-color: #4A1635;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #5C1C42;
}

.button-group {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.home-button-container {
    margin-top: 20px;
    text-align: center;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

input[type="file"] {
    display: block;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.form-control:focus {
    border-color: #4A1635;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 22, 53, 0.2);
}

/* Content Containers */
.result-container {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.info-container {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    line-height: 1.6;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.revision-form {
    margin-top: 20px;
}

/* Specific Elements */
#scope-text, #estimate-text {
    margin-bottom: 20px;
}

#loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}

#findings-container {
    margin-top: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    padding: 3px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #4A1635;
    transition: width 0.5s ease;
    border-radius: 10px;
}

#progress-status {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

#progress-container {
    margin: 20px 0;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

/* Print Styles */
@media print {
    body {
        margin: 0;
        padding: 20px;
        background: white;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .button-group, 
    .progress-bar-container,
    .form-group {
        display: none;
    }
    
    .content {
        background: none;
        padding: 0;
        margin: 0;
    }
    
    h1, h2 {
        page-break-after: avoid;
    }
    
    p {
        orphans: 3;
        widows: 3;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-control {
        font-size: 16px;
    }
    
    .container {
        padding: 15px;
    }
}

/* Independent Contractor Module Styles */
.ic-progress-bar {
    height: 30px;
    font-size: 14px;
    line-height: 30px;
}

.ic-risk-indicator {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ic-risk-low {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ic-risk-medium {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.ic-risk-high {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.analysis-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    line-height: 1.8;
    font-family: 'Georgia', serif;
}

.ic-section-card {
    border-left: 4px solid #007bff;
    margin-bottom: 20px;
}

.ic-warning-box {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.ic-red-flag {
    background: #fee2e2;
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

/* Enhanced content formatting for Claude outputs */
.formatted-content {
    line-height: 1.6;
    font-family: Arial, sans-serif;
    color: #333;
    max-width: none;
}

.formatted-content h1 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 1.5em 0 0.8em 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.3em;
}

.formatted-content h2 {
    font-size: 1.3em;
    font-weight: bold;
    margin: 1.3em 0 0.6em 0;
    color: #34495e;
}

.formatted-content h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin: 1.1em 0 0.5em 0;
    color: #555;
}

.formatted-content p {
    margin: 0.8em 0;
    text-align: justify;
    hyphens: auto;
}

.formatted-content ul {
    margin: 1em 0;
    padding-left: 2em;
}

.formatted-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.formatted-content li {
    margin: 0.5em 0;
    line-height: 1.5;
}

.formatted-content br {
    display: block;
    margin: 0.5em 0;
    content: "";
}

.formatted-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.formatted-content em {
    font-style: italic;
    color: #555;
}

/* Prevent text from running together */
.formatted-content * + * {
    margin-top: 0.3em;
}

/* Content containers - use this class for all Claude outputs */
.content, 
.result-container .content, 
#scope-content, 
#scope-text,
#estimate-text, 
#findings-text,
.analysis-content {
    background-color: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    /* Apply formatted-content styles directly */
    line-height: 1.6;
    font-family: Arial, sans-serif;
    color: #333;
}

/* Header styles for content containers */
.content h1, 
.result-container .content h1, 
#scope-content h1, 
#scope-text h1,
#estimate-text h1, 
#findings-text h1,
.analysis-content h1 {
    font-size: 1.5em;
    font-weight: bold;
    margin: 1.5em 0 0.8em 0;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.3em;
}

.content h2, 
.result-container .content h2, 
#scope-content h2, 
#scope-text h2,
#estimate-text h2, 
#findings-text h2,
.analysis-content h2 {
    font-size: 1.3em;
    font-weight: bold;
    margin: 1.3em 0 0.6em 0;
    color: #34495e;
}

.content h3, 
.result-container .content h3, 
#scope-content h3, 
#scope-text h3,
#estimate-text h3, 
#findings-text h3,
.analysis-content h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin: 1.1em 0 0.5em 0;
    color: #555;
}

.content p, 
.result-container .content p, 
#scope-content p, 
#scope-text p,
#estimate-text p, 
#findings-text p,
.analysis-content p {
    margin: 0.8em 0;
}

.content ul, 
.result-container .content ul, 
#scope-content ul, 
#scope-text ul,
#estimate-text ul, 
#findings-text ul,
.analysis-content ul {
    margin: 1em 0;
    padding-left: 2em;
}

.content ol, 
.result-container .content ol, 
#scope-content ol, 
#scope-text ol,
#estimate-text ol, 
#findings-text ol,
.analysis-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.content li, 
.result-container .content li, 
#scope-content li, 
#scope-text li,
#estimate-text li, 
#findings-text li,
.analysis-content li {
    margin: 0.5em 0;
    line-height: 1.5;
}

/* Remove conflicts with analysis-content */
.analysis-content {
    /* Keep the existing IC-specific styles but remove conflicting ones */
    border-left: 4px solid #007bff;
    max-height: 600px;
    overflow-y: auto;
    /* Remove: white-space: pre-wrap; and font-family: 'Georgia', serif; */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }
    
    .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .form-control {
        font-size: 16px;
    }
    
    .container {
        padding: 15px;
    }
    
    .formatted-content,
    .content, 
    #scope-content, 
    #scope-text,
    #estimate-text, 
    #findings-text {
        padding: 15px;
        font-size: 14px;
    }
    
    .formatted-content h1,
    .content h1, 
    #scope-content h1, 
    #scope-text h1,
    #estimate-text h1, 
    #findings-text h1 {
        font-size: 1.3em;
    }
    
    .formatted-content h2,
    .content h2, 
    #scope-content h2, 
    #scope-text h2,
    #estimate-text h2, 
    #findings-text h2 {
        font-size: 1.2em;
    }
}

