/* Legal Document Analyzer Frontend Styles */

/* Main Layout Container */
.ldc-main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.ldc-upload-limits-display {
    flex: 0 0 300px;
    width: 300px;
    order: 1; /* Move upload limits to the left */
}

.ldc-container {
    flex: 1;
    order: 2; /* Main container comes second (right) */
}

/* Responsive adjustments - make drop zone more flexible */
@media (max-width: 1600px) {
    .ldc-upload-limits-display {
        flex: 0 0 280px;
        width: 280px;
    }
}

@media (max-width: 1500px) {
    .ldc-upload-limits-display {
        flex: 0 0 260px;
        width: 260px;
    }
}

@media (max-width: 1404px) {
    .ldc-main-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .ldc-upload-limits-display {
        flex: none;
        width: 100%;
        order: 2; /* Keep upload limits below main container on smaller screens */
    }
    
    .ldc-container {
        order: 1; /* Main container comes first on smaller screens */
    }
}

.ldc-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Comprehensive Comparison Table Styles */
.ldc-comprehensive-comparison {
    margin: 30px 0;
}

.ldc-comprehensive-comparison h2 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

        .ldc-comparison-subtable {
            margin-bottom: 30px;
            background: #f8f9fa;
            padding: 0px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        .ldc-comparison-subtable h3 {
            color: #34495e;
            font-size: 18px;
            margin: 0 !important;
            margin-bottom: 0 !important;
            padding: 10px 15px;
            background: linear-gradient(135deg, #ecf0f1, #bdc3c7);
            border-left: 2px solid #3498db;
        }
        
        /* Force remove any margin/padding that might be causing gaps */
        .ldc-comprehensive-comparison .ldc-comparison-subtable h3 {
            margin: 0 !important;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            padding-bottom: 10px !important;
            padding-top: 10px !important;
            padding-left: 15px !important;
            padding-right: 15px !important;
        }
        
        /* Ultra-specific selector to override any conflicting CSS */
        .ldc-comprehensive-comparison .ldc-comparison-subtable h3,
        .ldc-comparison-subtable h3,
        .ldc-comprehensive-comparison h3 {
            margin: 0 !important;
            margin-bottom: 0 !important;
            margin-top: 0 !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
        }
        
        /* Target any h3 that might be inheriting margins */
        .ldc-comparison-subtable h3,
        .ldc-comparison-subtable h3 * {
            margin-bottom: 0 !important;
        }
        
        /* Override browser default h3 margins */
        .ldc-comparison-subtable h3 {
            margin-block-start: 0 !important;
            margin-block-end: 0 !important;
            margin-inline-start: 0 !important;
            margin-inline-end: 0 !important;
            margin: 0 !important;
        }
        
        .ldc-comparison-subtable-inner {
            width: 100%;
            border-collapse: collapse;
            background: white;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
        
        .ldc-comparison-subtable-inner th {
            background: linear-gradient(135deg, #3498db, #2980b9);
            color: white;
            padding: 12px 10px;
            text-align: left;
            font-weight: 600;
            font-size: 13px;
        }
        
        .ldc-comparison-subtable-inner td {
            padding: 10px;
            border-bottom: 1px solid #e9ecef;
            vertical-align: top;
            font-size: 13px;
            line-height: 1.4;
        }
        
        .ldc-comparison-subtable-inner tr:nth-child(even) {
            background-color: #f8f9fa;
        }
        
        .ldc-comparison-subtable-inner tr:hover {
            background-color: #e3f2fd;
        }
        
        .ldc-comparison-subtable-inner td:first-child {
            font-weight: 600;
            color: #2c3e50;
            background-color: #ecf0f1;
            width: 80px;
        }
        
        .ldc-comparison-subtable-inner td:first-child strong {
            color: #e74c3c;
        }
        
        /* Remove table margins that might be causing spacing issues */
        .ldc-comparison-subtable table,
        .ldc-comparison-subtable .ldc-table-container table,
        .ldc-analysis-content table {
            margin: 0 !important;
        }

        /* Mobile responsiveness for sub-tables */
        @media (max-width: 768px) {
            .ldc-comparison-subtable {
                padding: 0px;
                margin-bottom: 20px;
            }
            
            .ldc-comparison-subtable h3 {
                font-size: 16px;
                padding: 8px 12px;
            }
            
            .ldc-comparison-subtable-inner th,
            .ldc-comparison-subtable-inner td {
                padding: 8px 6px;
                font-size: 12px;
            }
            
            .ldc-comparison-subtable-inner td:first-child {
                width: 60px;
            }
        }

/* File Types Info */
.ldc-file-types-info {
    margin: 0;
    text-align: center;
    clear: both;
}

.ldc-allowed-types {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.ldc-allowed-types strong {
    color: #333;
}

.ldc-file-types-info p {
    margin: 0 0 8px 0;
}

.ldc-file-types-info p:last-child {
    margin-bottom: 0;
}

.ldc-file-size-limit {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.ldc-file-size-limit strong {
    color: #333;
}

/* File Manager Modal Styles */
.ldc-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.ldc-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ldc-modal-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ldc-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3em;
}

.ldc-modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.ldc-modal-close:hover {
    color: #000;
}

.ldc-modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.ldc-modal-footer {
    background: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.ldc-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.ldc-modal-cancel {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
}

.ldc-modal-cancel:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
    background: linear-gradient(135deg, #5a6268, #495057);
}

.ldc-modal-select {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.ldc-modal-select:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #229954, #1e8449);
}

.ldc-modal-select:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Modal Instructions */
.ldc-modal-instructions {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
}

.ldc-modal-instructions p {
    margin: 0;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

/* File List Styles */
.ldc-file-list {
    margin: 0;
}

.ldc-file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ldc-file-item:hover {
    border-color: #007cba;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.15);
}

.ldc-file-item.selected {
    border-color: #007cba;
    background: #e3f2fd;
}

.ldc-file-item input[type="radio"]:checked + .ldc-file-info,
.ldc-file-item input[type="checkbox"]:checked + .ldc-file-info {
    background: #e3f2fd;
    border-radius: 4px;
    padding: 5px;
    border-left: 3px solid #007cba;
}

.ldc-file-item input[type="radio"]:checked + .ldc-file-info .ldc-file-name,
.ldc-file-item input[type="checkbox"]:checked + .ldc-file-info .ldc-file-name {
    color: #007cba;
}

.ldc-file-item input[type="radio"]:checked + .ldc-file-info,
.ldc-file-item input[type="checkbox"]:checked + .ldc-file-info {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 5px;
}

.ldc-file-item input[type="radio"],
.ldc-file-item input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.2);
    cursor: pointer;
}

.ldc-file-info {
    flex: 1;
}

.ldc-file-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.95em;
    line-height: 1.3;
    text-align: left;
}

.ldc-file-details {
    font-size: 0.9em;
    color: #6c757d;
}

.ldc-file-details span {
    margin-right: 15px;
}

/* Upload Limits Styles */
.ldc-limits-grid {
    display: flex !important;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Container-based responsive design for narrow columns */
.ldc-upload-limits {
    container-type: inline-size;
}

/* When the container itself is narrow (regardless of viewport) */
@container (max-width: 500px) {
    .ldc-limits-grid {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .ldc-limit-item {
        width: auto !important;
        min-width: unset !important;
        flex: none !important;
    }
}

/* Fallback for browsers that don't support container queries */
/* Applied via JavaScript when container width < 500px */
.ldc-limits-narrow {
    .ldc-limits-grid {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .ldc-limit-item {
        width: auto !important;
        min-width: unset !important;
        flex: none !important;
    }
}

.ldc-limit-item {
    flex: 1;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    min-width: 0;
}

.ldc-limit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ldc-limit-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.ldc-limit-value {
    font-weight: 700;
    color: #2c3e50;
    font-size: 0.9em;
}

.ldc-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 8px 0;
    overflow: hidden;
}

.ldc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ldc-remaining {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

/* Warning Usage Layout */
.ldc-current-usage {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.ldc-usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 15px;
    flex: 1;
    min-width: 120px;
}

.ldc-usage-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.85em;
}

.ldc-usage-value {
    font-weight: 700;
    color: #212529;
    font-size: 0.85em;
}

/* File Actions Styles */
.ldc-file-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.ldc-file-selection-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.ldc-analysis-button {
    display: flex;
    justify-content: center;
}

.ldc-upload-btn {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.ldc-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #229954, #1e8449);
}

.ldc-file-manager-btn {
    flex: 1;
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(39, 174, 96, 0.3);
}

.ldc-file-manager-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #229954, #1e8449);
}

.ldc-loading-files {
    text-align: center;
    padding: 40px 20px;
}

.ldc-loading-files .ldc-spinner {
    margin: 0 auto 20px;
}

/* PMPro Integration Styles */
.ldc-user-limits {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.ldc-user-limits h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    margin-left: -20px;    font-size: 1.2em;
    font-weight: 600;
}

.ldc-user-limits ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.ldc-user-limits li {
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 0.9em;
}

.ldc-user-limits li:last-child {
    border-bottom: none;
}

.ldc-user-limits-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.ldc-user-limits-display h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    margin-left: -20px;    font-size: 1.3em;
    font-weight: 600;
}

.ldc-user-limits-display ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.ldc-user-limits-display li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.ldc-user-limits-display li:last-child {
    border-bottom: none;
}

.ldc-limit-exceeded {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    color: #721c24;
}

.ldc-limit-exceeded p {
    margin: 0;
    font-weight: 500;
}



.ldc-header {
    display: none; /* using wp header */
    text-align: center;
    margin-bottom: 30px;
}

.ldc-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2.2em;
    font-weight: 600;
}

.ldc-header p {
    color: #7f8c8d;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Tab Container */
.ldc-tab-container {
    margin-bottom: 30px;
}

.ldc-tab-header {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 6px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
    overflow: hidden;
    border: 1px solid #e2e4e7;
}

.ldc-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    min-height: 50px;
}

.ldc-tab-btn:hover:not(:disabled) {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    transform: translateY(-1px);
}

.ldc-tab-btn.ldc-tab-active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    /* box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3); */
    border: 1px solid #e2e4e7;
    transform: translateY(-1px);
}

.ldc-tab-btn.ldc-tab-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e9ecef;
    color: #6c757d;
}

.ldc-tab-btn.ldc-tab-disabled:hover {
    transform: none;
    background: #e9ecef;
    color: #6c757d;
}

.ldc-tab-btn i {
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.ldc-tab-btn.ldc-tab-active i {
    transform: scale(1.1);
}

.ldc-tab-btn span {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.ldc-radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.ldc-radio-text {
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
}

.ldc-radio-label.ldc-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ldc-radio-label.ldc-disabled input[type="radio"] {
    cursor: not-allowed;
}

.ldc-radio-label.ldc-disabled .ldc-radio-text {
    cursor: not-allowed;
    color: #6c757d;
}

/* Upload Section */
.ldc-upload-section {
    width: 100%;
    background: none;
    border-radius: 0px;
    padding: 0px;
    box-shadow: none;
    margin-bottom: 30px;
}

/* New Comparison Layout - Left side file slots, right side drop zone */
.ldc-comparison-layout {
    display: flex;
    gap: 0px;
    margin-bottom: 20px;
    align-items: flex-start;
}

/* Align drop zone with first file slot */
.ldc-drag-drop-zone {
    margin-top: 0;
}

/* Left side: File slots */
.ldc-file-slots {
    flex: 1;
    margin-right: 25px;
    margin-right: 20px;
    margin-top: 0;
}

.ldc-file-slot {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 10px 15px 8px 15px;
    margin-bottom: 15px;
    margin-left: -20px;    transition: all 0.3s ease;
}

.ldc-slot-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ldc-slot-header {
    margin-bottom: 5px;
}

.ldc-slot-title {
    margin: 0;
    color: #2c3e50;
    font-size: 1em;
    font-weight: 600;
    padding: 5px 0;
    border-bottom: 2px solid #3498db;
}

.ldc-file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 0px;
    padding: 6px;
    border-bottom: 1px solid #e9ecef;
}

.ldc-file-name {
    font-weight: 500;
    color: #2c3e50;
}

.ldc-file-size {
    color: #6c757d;
    font-size: 0.9em;
}

.ldc-slot-actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 8px;
    justify-content: space-between;
}

/* Specific styling for file info within slots */
.ldc-file-slot .ldc-file-info {
    margin-top: 10px;
    margin-bottom: 0px;
    padding: 6px;
}

.ldc-upload-btn,
.ldc-file-manager-btn,
.ldc-download-file,
.ldc-remove-file {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ldc-upload-btn {
    background: #3498db;
    color: white;
}

.ldc-upload-btn:hover {
    background: #2980b9;
}

.ldc-file-manager-btn {
    background: #9b59b6;
    color: white;
}

.ldc-file-manager-btn:hover {
    background: #8e44ad;
}

.ldc-download-file {
    background: #27ae60;
    color: white;
}

.ldc-download-file:hover {
    background: #229954;
}

.ldc-download-file:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

.ldc-remove-file {
    background: #e74c3c;
    color: white;
}

.ldc-remove-file:hover {
    background: #c0392b;
}

.ldc-remove-file:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* Right side: Right column containing drop zone and file types info */
/*.ldc-right-column {
    flex: 0 0 350px;
    width: 350px;
}
    */

/* Drag and drop zone */
/*.ldc-drag-drop-zone {
    width: 100%;
    height: 250px;
    border: 3px dashed #3498db;
    border-radius: 12px;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 70px;
    margin-bottom: 20px;
}*/

.ldc-drag-drop-zone {
    width: 80%;
    max-width: 500px; /* Prevents it from getting too wide on large screens */
    height: 250px;
    border: 3px dashed #3498db;
    border-radius: 12px;
    background: #ecf0f1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 70px auto 20px; /* Centers it horizontally */
}

/* 📱 Medium screens */
@media (max-width: 768px) {
    .ldc-drag-drop-zone {
        max-width: 90%;
        height: 200px;
    }

    .ldc-drag-drop-zone h4 {
        font-size: 1rem;
    }

    .ldc-drag-drop-zone p {
        font-size: 0.9rem;
    }
}

/* 📱 Small screens */
@media (max-width: 480px) {
    .ldc-drag-drop-zone {
        max-width: 95%;
        height: 150px;
        padding: 10px;
    }

    .ldc-drag-drop-zone h4 {
        font-size: 0.9rem;
    }

    .ldc-drag-drop-zone p {
        font-size: 0.8rem;
    }
}


.ldc-drag-drop-zone:hover {
    border-color: #2980b9;
    background: #d6eaf8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.ldc-drag-drop-zone.ldc-drag-over {
    border-color: #27ae60;
    background: #d5f4e6;
}

.ldc-drop-zone-content {
    text-align: center;
    padding: 20px;
}

.ldc-drop-zone-icon {
    font-size: 1em;
    margin-bottom: 15px;
    /*margin-left: -20px;   */ 
    color: #7f8c8d;
}

.ldc-drop-zone-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.ldc-drop-zone-content p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 0.9em;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .ldc-comparison-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .ldc-file-slots {
        margin-right: 0;
        order: 2; /* Move file slots below drag-and-drop zone */
    }
    
    .ldc-right-column {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        order: 1; /* Move right column (drag-and-drop zone) above file slots */
    }
    
    .ldc-drag-drop-zone {
        width: 100%;
        margin-bottom: 15px;
    margin-left: -20px;        margin-top: 0; /* Remove top margin on mobile since it's now at the top */
    }
}

@media (max-width: 1404px) {
    .ldc-comparison-layout {
        flex-direction: column;
        gap: 20px;
    }
    
    .ldc-file-slots {
        margin-right: 0;
        order: 2; /* Move file slots below drag-and-drop zone */
        width: 100%; /* Make file slots full width on smaller screens */
    }
    
    .ldc-right-column {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        order: 1; /* Move right column (drag-and-drop zone) above file slots */
    }
    
    .ldc-drag-drop-zone {
        width: 100%;
        max-width: 100%;
        margin-bottom: 15px;
    /*margin-left: -20px; */      
     margin-top: 0; /* Remove top margin on mobile since it's now at the top */
    }
}

/* Button stacking for smaller screens */
@media (max-width: 948px) {
    .ldc-slot-actions {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .ldc-upload-btn,
    .ldc-file-manager-btn,
    .ldc-download-file,
    .ldc-remove-file {
        width: 100%;
        text-align: center;
    }
}


/* File Input Styling */
/*#ldc-upload-form {
    margin-right: 30px;
    }*/

.ldc-file-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.ldc-file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.ldc-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 3px dashed #3498db;
    border-radius: 12px;
    background: #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 150px;
    width: 100%;
    box-sizing: border-box;
}

.ldc-file-label:hover {
    border-color: #2980b9;
    background: #d6eaf8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}

.ldc-file-label.ldc-drag-over {
    border-color: #27ae60;
    background: #d5f4e6;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.ldc-file-label.ldc-drag-over .ldc-file-text {
    color: #27ae60;
}

.ldc-file-icon {
    font-size: 1em;
    margin-bottom: 15px;
      
    color: #7f8c8d;
}

.ldc-file-text {
    font-size: 1.2em;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 10px;
}

.ldc-drag-hint {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ldc-file-label.ldc-drag-over .ldc-drag-hint {
    opacity: 1;
    color: #27ae60;
}

/* File Info */
.ldc-file-info {
    background: #e8f4fd;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.ldc-file-info p {
    margin: 5px 0;
    color: #2c3e50;
}

.ldc-file-info strong {
    color: #3498db;
}

/* Submit Button */
.ldc-submit-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #DE8B33, #DE7807);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.ldc-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #DE7807, #B85A00);
}

.ldc-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}



/* Results Section */
.ldc-results {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

/* Loading Spinner */
.ldc-loading {
    text-align: center;
    padding: 40px 20px;
}

.ldc-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.ldc-loading p {
    color: #7f8c8d;
    font-size: 1.1em;
    margin: 0;
}

/* Analysis Results */
.ldc-analysis {
    line-height: 1.7;
    color: #2c3e50;
}

.ldc-analysis h1,
.ldc-analysis h2,
.ldc-analysis h3 {
    color: #2c3e50;
    margin-top: 25px;
    margin-bottom: 15px;
    margin-left: -20px;    font-weight: 600;
}

.ldc-analysis h1 {
    font-size: 1.8em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.ldc-analysis h2 {
    font-size: 1.5em;
    color: #3498db;
}

.ldc-analysis h3 {
    font-size: 1.3em;
    color: #2980b9;
}

.ldc-analysis p {
    margin-bottom: 15px;
    margin-left: -20px;    text-align: justify;
}

.ldc-analysis ul {
    margin: 15px 0;
    padding-left: 20px;
}

.ldc-analysis li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.ldc-analysis strong {
    color: #e74c3c;
    font-weight: 600;
}

.ldc-analysis em {
    color: #f39c12;
    font-style: italic;
}

/* Error Styling */
.ldc-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 20px;
    color: #c33;
    text-align: center;
}

.ldc-error p {
    margin: 0;
    font-weight: 500;
}

/* Message styling */
.ldc-message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid;
    text-align: center;
}

.ldc-message.ldc-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.ldc-message.ldc-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.ldc-error a {
    color: #721c24;
    text-decoration: none;
    font-weight: 600;
}

.ldc-error a:hover {
    color: #491217;
    text-decoration: none;
}

.ldc-message.ldc-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.ldc-message.ldc-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ldc-container {
        padding: 4px;
    }
    
    .ldc-header h2 {
        font-size: 1.8em;
    }
    
    .ldc-tab-header {
        flex-direction: column;
        gap: 4px;
    }
    
    .ldc-tab-btn {
        width: 100%;
        padding: 18px 24px;
        font-size: 1rem;
        min-height: 60px;
    }
    
    .ldc-tab-btn i {
        font-size: 1.3em;
    }
    

    
    .ldc-upload-section {
        width: 100%;
        padding: 0px;
    }
    
    .ldc-file-label {
        padding: 30px 15px;
        min-height: 120px;
    }
    
    .ldc-file-icon {
        font-size: 2.5em;
    }
    
    .ldc-file-text {
        font-size: 1.1em;
    }
    
    /* Stack Upload Limits vertically on tablets and mobile */
    .ldc-upload-limits .ldc-limits-grid,
    .ldc-limits-info .ldc-limits-grid {
        flex-direction: column !important;
        gap: 15px !important;
        display: flex !important;
    }
    
    .ldc-upload-limits .ldc-limit-item,
    .ldc-limits-info .ldc-limit-item {
        width: auto !important;
        min-width: unset !important;
        flex: none !important;
    }
    
    .ldc-limit-header {
        justify-content: space-between !important;
        margin-bottom: 8px !important;
    }
    
    .ldc-limit-label {
        font-size: 0.9em !important;
    }
    
    .ldc-limit-value {
        font-size: 0.9em !important;
        font-weight: 600 !important;
    }
    
    .ldc-remaining {
        font-size: 0.8em !important;
        margin-top: 5px !important;
    }
    
    /* Stack warning usage items vertically on mobile */
    .ldc-current-usage {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .ldc-usage-item {
        width: 100% !important;
        justify-content: space-between !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .ldc-usage-item:last-child {
        border-bottom: none !important;
    }
    
    .ldc-usage-label {
        font-size: 0.9em !important;
    }
    
    .ldc-usage-value {
        font-size: 0.9em !important;
        font-weight: 600 !important;
    }
}

@media (max-width: 480px) {
    .ldc-header h2 {
        font-size: 1.5em;
    }
    
    .ldc-file-label {
        padding: 25px 10px;
        min-height: 100px;
    }
    
    .ldc-file-icon {
        font-size: 2em;
    }
    
    .ldc-file-text {
        font-size: 1em;
    }
    
    .ldc-file-selection-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .ldc-upload-btn,
    .ldc-file-manager-btn {
        flex: none;
        width: 100%;
    }
    
    .ldc-submit-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 1em;
    }
}

/* Modal Responsive Styles */
@media (max-width: 768px) {
    .ldc-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .ldc-modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .ldc-modal-btn {
        width: 100%;
        margin: 0;
    }
}

/* Print Styles */
@media print {
    .ldc-tab-container,
    .ldc-upload-section {
        display: none;
    }
    
    .ldc-results {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .ldc-analysis {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* Upgrade Notice Styles */
.ldc-upgrade-notice {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    display: block;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
}



.ldc-upgrade-notice .ldc-upgrade-content h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 18px;
    font-weight: 600;
}

.ldc-upgrade-notice .ldc-upgrade-content p {
    margin: 0;
    color: #856404;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

/* First Page Warning - Clean, subtle styling for first page analysis notice */
.ldc-upgrade-notice.ldc-first-page-warning {
    background: #fff9c4;
    border: 1px solid #f57f17;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(245, 127, 23, 0.15);
    text-align: center;
}

.ldc-upgrade-notice.ldc-first-page-warning .ldc-upgrade-content h4 {
    color: #e65100;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ldc-upgrade-notice.ldc-first-page-warning .ldc-upgrade-content p {
    color: #bf360c;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
}

/* Comparison Warning Styles */
.ldc-comparison-warning {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #f56565;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0 20px 0;
    display: none; /* Hidden by default */
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.15);
    transition: all 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

.ldc-comparison-warning.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.ldc-comparison-warning .ldc-warning-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.ldc-comparison-warning .ldc-warning-content h5 {
    margin: 0 0 10px 0;
    color: #c53030;
    font-size: 16px;
    font-weight: 600;
}

.ldc-comparison-warning .ldc-warning-content p {
    margin: 0 0 15px 0;
    color: #c53030;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
}

.ldc-comparison-warning .ldc-warning-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ldc-comparison-warning .ldc-warning-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ldc-comparison-warning .ldc-manage-files-btn {
    background: #3182ce;
    color: white;
}

.ldc-comparison-warning .ldc-manage-files-btn:hover {
    background: #2c5aa0;
}

.ldc-comparison-warning .ldc-upgrade-btn {
    background: #38a169;
    color: white;
}

.ldc-comparison-warning .ldc-upgrade-btn:hover {
    background: #2f855a;
}

/* Responsive adjustments for comparison warning */
@media (max-width: 768px) {
    .ldc-comparison-warning {
        padding: 15px;
        margin-top: 15px;
    }
    
    .ldc-comparison-warning .ldc-warning-actions {
        flex-direction: column;
    }
    
    .ldc-comparison-warning .ldc-warning-actions button {
        width: 100%;
        text-align: center;
    }
}

/* Analysis Content Styling - Professional Legal Document Look */
.ldc-analysis-content {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    max-width: 100%;
    background: #ffffff;
    padding: 0;
}

.ldc-analysis-header {
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: 600;
    margin: 2em 0 1em 0;
    padding: 0.5em 0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ldc-analysis-header:first-child {
    margin-top: 0;
}

.ldc-analysis-paragraph {
    margin: 1.2em 0;
    padding: 0;
    line-height: 1.7;
    text-align: left;
    color: #2c3e50;
}

/* Professional list formatting - clean and minimal */
.ldc-analysis-list {
    margin: 1.2em 0 1.5em 0;
    padding: 0;
    list-style: none;
}

.ldc-analysis-list li {
    position: relative;
    margin: 0.8em 0;
    padding: 0.4em 0 0.4em 1.5em;
    line-height: 1.6;
    color: #2c3e50;
    padding-left: 1.2em;
}

.ldc-analysis-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2c3e50;
    font-weight: normal;
    font-size: 1em;
    top: 0.3em;
}

/* Professional critical issues styling - clean and minimal */
.ldc-critical-issues {
    margin: 1.2em 0 1.5em 0;
    padding: 0;
}

.ldc-issue-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    margin: 1em 0;
    padding: 1em 1.2em;
    position: relative;
    color: #2c3e50;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ldc-issue-item::before {
    content: '⚠';
    position: absolute;
    left: -0.4em;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0.1em 0.2em;
    border-radius: 50%;
    font-size: 0.7em;
    color: #e74c3c;
    border: 1px solid #e0e0e0;
}

.ldc-issue-item:first-child {
    margin-top: 0;
}

/* Table styling for risk assessment matrix */
.ldc-analysis-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9em;
}

.ldc-analysis-content th {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 0.8em;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
}

.ldc-analysis-content td {
    border: 1px solid #e0e0e0;
    padding: 0.8em;
    text-align: left;
    color: #2c3e50;
}

.ldc-analysis-content tr:nth-child(even) {
    background: #fafafa;
}

/* Enhanced Risk Assessment Matrix Table Styling */
.ldc-risk-matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
    table-layout: fixed; /* Prevent table from expanding beyond container */
    max-width: 100%; /* Ensure table doesn't exceed container width */
}

.ldc-risk-matrix-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.ldc-risk-matrix-table th {
    background: transparent;
    border: none;
    padding: 1em 0.8em;
    text-align: left;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85em;
    word-wrap: break-word; /* Allow long headers to wrap */
    overflow-wrap: break-word;
}

.ldc-risk-matrix-table td {
    border: 1px solid #e0e0e0;
    padding: 0.8em;
    text-align: left;
    color: #2c3e50;
    vertical-align: top;
    word-wrap: break-word; /* Allow long content to wrap */
    overflow-wrap: break-word;
    max-width: 0; /* Force text wrapping */
}

.ldc-risk-matrix-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.ldc-risk-matrix-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.ldc-risk-matrix-table tbody tr:hover {
    background: #e8f4fd;
    transition: background-color 0.2s ease;
}

/* Risk Level Color-Coded Badges */
.ldc-risk-level {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    min-width: 70px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid;
    white-space: nowrap; /* Prevent risk level badges from wrapping */
}

.ldc-risk-critical {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-color: #c0392b;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.ldc-risk-high {
    background: linear-gradient(135deg, #ff8c00, #ff7700);
    color: white;
    border-color: #ff7700;
    box-shadow: 0 2px 4px rgba(255, 140, 0, 0.3);
}

.ldc-risk-medium {
    background: linear-gradient(135deg, #ffd700, #ffcc00);
    color: #333;
    border-color: #ffcc00;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.ldc-risk-low {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    border-color: #229954;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ldc-analysis-content {
        font-size: 0.95em;
    }
    
    .ldc-analysis-header {
        font-size: 1.1em;
        margin: 1.5em 0 0.8em 0;
    }
    
    .ldc-analysis-paragraph {
        margin: 1em 0;
    }
    
    .ldc-analysis-list li {
        margin: 0.6em 0;
        padding: 0.3em 0 0.3em 1.3em;
    }
    
    .ldc-issue-item {
        padding: 0.8em 1em;
        margin: 0.8em 0;
    }
    
    .ldc-analysis-content table {
        font-size: 0.8em;
    }
    
    .ldc-analysis-content th,
    .ldc-analysis-content td {
        padding: 0.6em;
    }
    
    /* Responsive Risk Assessment Matrix */
    .ldc-risk-matrix-table {
        font-size: 0.8em;
        margin: 1em 0;
        table-layout: auto; /* Allow flexible layout on mobile */
        overflow-x: auto; /* Enable horizontal scroll on small screens */
        display: block; /* Make table scrollable on mobile */
    }
    
    .ldc-risk-matrix-table thead,
    .ldc-risk-matrix-table tbody,
    .ldc-risk-matrix-table tr {
        display: block; /* Stack elements vertically on mobile */
    }
    
    .ldc-risk-matrix-table th,
    .ldc-risk-matrix-table td {
        padding: 0.6em 0.4em;
        font-size: 0.85em;
        display: block; /* Stack cells vertically on mobile */
        text-align: left;
        border: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .ldc-risk-matrix-table th {
        background: #2c3e50;
        color: white;
        font-weight: 600;
        border-bottom: 2px solid #34495e;
    }
    
    .ldc-risk-matrix-table td:last-child {
        border-bottom: none;
    }
    
    .ldc-risk-level {
        padding: 4px 8px;
        font-size: 0.75em;
        min-width: 60px;
    }
}

/* File Manager Integration Styles */
.ldc-user-limits {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

/* File Group Actions Styles */
.ldc-file-group .ldc-file-actions {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ldc-file-group .ldc-file-selection-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 0;
}

.ldc-file-group .ldc-upload-btn,
.ldc-file-group .ldc-file-manager-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.9em;
    min-width: 0;
}

.ldc-file-group .ldc-upload-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.ldc-file-group .ldc-upload-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.ldc-file-group .ldc-file-manager-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 3px 10px rgba(155, 89, 182, 0.3);
}

.ldc-file-group .ldc-file-manager-btn:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

/* Public File Badge */
.ldc-public-file-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 500;
    margin-left: 8px;
    border: 1px solid #bbdefb;
}

/* Dynamic File Input Styles */
.ldc-file-row {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.ldc-file-row:nth-child(even) {
    background: #ffffff;
}

.ldc-file-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ldc-file-input-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.ldc-file-input-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #bdc3c7;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ldc-file-input-group input[type="file"]:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.ldc-file-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ldc-upload-btn,
.ldc-select-btn {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.ldc-upload-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.ldc-upload-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.ldc-select-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    box-shadow: 0 3px 10px rgba(155, 89, 182, 0.3);
}

.ldc-select-btn:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.ldc-file-info {
    margin-top: 15px;
    padding: 15px;
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
}

.ldc-file-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.ldc-file-name {
    font-weight: 600;
    color: #2c3e50;
    flex: 1;
}

.ldc-file-size {
    color: #666;
    font-size: 0.9em;
}

.ldc-download-file {
    background: #27ae60;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.3s ease;
}

.ldc-download-file:hover {
    background: #229954;
}

.ldc-remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.3s ease;
}

.ldc-remove-file:hover {
    background: #c0392b;
}

/* File Manager Modal - Custom layout improvements */
.ldc-file-item {
    margin-bottom: 15px;
    margin-left: -20px;    padding: 2px 10px 0px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
}

.ldc-file-item:hover {
    background: #f0f0f0;
}

.ldc-file-item input[type="radio"] {
    margin-right: 10px;
    flex-shrink: 0;
    align-self: center;
}

.ldc-file-info {
    flex: 1;
    display: block;
}

.ldc-file-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    word-break: break-word;
    line-height: 1.3;
    font-size: 0.85em;
    text-align: left;
}

.ldc-file-details {
    display: flex;
    gap: 10px;
    color: #666;
    font-size: 0.75em;
    flex-wrap: wrap;
    overflow: visible;
}

.ldc-file-details span {
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

/* Responsive adjustments for dynamic inputs */
@media (max-width: 768px) {
    .ldc-file-actions {
        flex-direction: column;
    }
    
    .ldc-file-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Folder Header Styles */
.ldc-folder-header {
    background: #e8f4fd;
    border: 1px solid #b3d9ff;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 10px 0 5px 0;
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #1e5f99;
    cursor: default;
}

.ldc-folder-icon {
    font-size: 16px;
    margin-right: 8px;
    flex-shrink: 0;
}

.ldc-folder-name {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ldc-folder-path {
    color: #1e5f99 !important;
    font-weight: 500;
    background: #e8f4fd;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7em;
}

/* Single Page Analysis Warning Styles */
.ldc-single-page-warning {
    margin: 0px !important;
    padding: 0px 0px 15px 0px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100%;
    /* Override inline styles */
    background-color: #fff3cd !important;
    border: 1px solid #ffeaa7 !important;
    border-radius: 6px !important;
    color: #856404 !important;
    font-weight: 500 !important;
}

.ldc-single-page-warning strong {
    display: block !important;
    text-align: center !important;
    width: 100%;
    margin-top: 0px;
}

/* Icon styling with FontAwesome support and fallback */
.ldc-single-page-warning i.fas.fa-exclamation-triangle {
    color: #f39c12 !important;
    margin-right: 0 !important;
    margin-bottom: 0px !important;
    margin-top: 15px !important;
    display: block !important;
    font-size: 24px;
    text-align: center;
    line-height: 1;
    width: 100%;
}

/* Fallback for when FontAwesome is not loaded - use Unicode warning symbol */
.ldc-single-page-warning i.fas.fa-exclamation-triangle:before {
    content: "⚠";
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
    display: block;
    text-align: center;
}

/* Additional fallback - if the icon class doesn't work at all */
.ldc-single-page-warning i.fas.fa-exclamation-triangle:not([class*="fa-"]):before {
    content: "⚠";
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: #f39c12;
    display: block;
    text-align: center;
    margin-bottom: 8px;
}

/* Analysis heading styles */
.ldc-analysis h2 {
    margin: 15px 2px;
}

.ldc-analysis h3 {
    margin: 10px 10px;
}
