/* Global styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
    padding-bottom: 100px; /* Space for fixed banner */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.main-description {
    color: #666;
    font-size: 1.1em;
}

/* Features list */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.feature-item i {
    font-size: 1.5em;
    color: #007bff;
    margin-right: 15px;
}

/* Legal notice */
.legal-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
}

.legal-notice i {
    font-size: 1.5em;
    color: #856404;
    margin-right: 15px;
    margin-top: 3px;
}

.legal-text {
    color: #856404;
    flex: 1;
}

/* Upload section */
.upload-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.upload-area {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.upload-area:hover, .upload-area.dragover {
    background-color: #e3f2fd;
    border-color: #0056b3;
}

.upload-icon {
    font-size: 3em;
    color: #007bff;
    margin-bottom: 15px;
}

/* File list */
.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 10px;
}

.file-name {
    flex: 1;
    margin-right: 10px;
}

.file-size {
    color: #6c757d;
    margin-right: 15px;
}

.file-remove {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Processing section */
.processing-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.progress-bar {
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    width: 0;
    transition: width 0.3s ease;
}

/* Results section */
.results-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Export buttons */
.export-buttons {
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.export-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.all-btn {
    background-color: #28a745;
    color: white;
}

.all-btn:hover {
    background-color: #218838;
}

/* DDV-O Form */
.ddv-form {
    margin-top: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.form-section h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 15px;
}

.form-row label {
    flex: 2;
    color: #495057;
}

.form-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: right;
    background-color: #fff;
}

/* Special styling for DDV fields */
.ddv-obligation {
    background-color: #FFB6C1 !important;
}

.ddv-surplus {
    background-color: #90EE90 !important;
}

/* Evidence tables */
.evidence-tables {
    margin-top: 20px;
}

.evidence-section {
    margin-bottom: 20px;
}

.evidence-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.table-container {
    overflow-x: auto;
}

.evidence-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.evidence-table th,
.evidence-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

/* Column classes for better readability */
.evidence-table th.col-h { background-color: #f1f3f5; }
.evidence-table td.col-date { color: #2b6777; }
.evidence-table td.col-text { color: #34495e; }
.evidence-table td.col-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Zebra striping by column (odd columns light gray) */
.evidence-table tbody tr td:nth-child(odd) {
    background-color: #fafafa;
}

.evidence-table td[title] {
    cursor: help;
}

.evidence-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
    white-space: nowrap;
}

/* Two-row header styles */
.evidence-table th.header-description {
    background-color: #e9ecef;
    font-weight: bold;
    color: #495057;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
    padding: 8px 6px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.evidence-table th.header-xml-tag {
    background-color: #f8f9fa;
    font-weight: normal;
    color: #6c757d;
    font-size: 0.75rem;
    white-space: nowrap;
    border-bottom: 1px solid #dee2e6;
    padding: 4px 6px;
    vertical-align: top;
}

.evidence-table tbody tr:hover {
    background-color: #f8f9fa;
}

.total-records {
    text-align: right;
    color: #6c757d;
    font-style: italic;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.close {
    font-size: 1.5em;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.modal-footer {
    text-align: right;
    margin-top: 20px;
}

/* Fixed advertisement banner */
.fixed-ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f9fa;
    border-top: 2px solid #007bff;
    padding: 15px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .form-row label {
        margin-bottom: 5px;
    }

    .export-buttons {
        flex-direction: column;
    }

    .features-list {
        grid-template-columns: 1fr;
    }
}

/* Company info section */
.company-info-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

#companyInfo {
    white-space: pre-wrap;
    margin: 10px 0;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Upload button */
.upload-container {
    text-align: center;
}

.upload-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin: 20px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.upload-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.upload-btn:not(:disabled):hover {
    background-color: #0056b3;
}

/* Button styles */
.btn {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* No data message */
.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}