/* Merge Excel Files - Frontend Styles */
.mef-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #333;
}

.mef-header {
    text-align: center;
    margin-bottom: 40px;
}

.mef-header h1 {
    font-size: 36px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.mef-subtitle {
    font-size: 18px;
    color: #7f8c8d;
    margin-top: 0;
}

.mef-upload-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #e1e8ed;
}

.mef-upload-section h2 {
    font-size: 24px;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.mef-dropzone {
    border: 3px dashed #bdc3c7;
    border-radius: 10px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-bottom: 20px;
}

.mef-dropzone:hover {
    border-color: #3498db;
    background: #e8f4fc;
    transform: translateY(-2px);
}

.mef-dropzone.dragover {
    border-color: #2ecc71;
    background: #e8f7ee;
    transform: scale(1.01);
}

.mef-dropzone-inner {
    max-width: 500px;
    margin: 0 auto;
}

.mef-dropzone-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: #3498db;
}

.mef-dropzone-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.mef-dropzone-formats {
    font-size: 16px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.mef-dropzone-max {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 20px;
}

.mef-browse-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.mef-browse-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.mef-file-list {
    margin-top: 30px;
}

.mef-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.mef-file-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mef-file-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mef-file-icon {
    font-size: 28px;
    color: #3498db;
}

.mef-file-details h4 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.mef-file-details p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #7f8c8d;
}

.mef-file-remove {
    color: #e74c3c;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 18px;
}

.mef-file-remove:hover {
    background: #ffeaea;
    transform: scale(1.1);
}

.mef-options-section {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    border: 1px solid #e1e8ed;
}

.mef-option-group {
    margin-bottom: 30px;
}

.mef-option-group h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 600;
}

.mef-radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mef-radio-label, .mef-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.mef-radio-label:hover, .mef-checkbox-label:hover {
    border-color: #3498db;
    background: #e8f4fc;
}

.mef-radio-label input:checked + .mef-radio-custom + .mef-radio-text,
.mef-checkbox-label input:checked + .mef-checkbox-custom + .mef-checkbox-text {
    border-color: #2ecc71;
    background: #e8f7ee;
}

.mef-radio-custom, .mef-checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    margin-top: 3px;
    flex-shrink: 0;
    position: relative;
}

.mef-checkbox-custom {
    border-radius: 4px;
}

.mef-radio-label input:checked + .mef-radio-custom::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    background: #2ecc71;
    border-radius: 50%;
}

.mef-checkbox-label input:checked + .mef-checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 3px;
    color: #2ecc71;
    font-weight: bold;
    font-size: 16px;
}

.mef-radio-text, .mef-checkbox-text {
    flex: 1;
}

.mef-radio-text strong, .mef-checkbox-text strong {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.mef-radio-text small, .mef-checkbox-text small {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
}

.mef-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 40px 0;
}

.mef-merge-btn, .mef-clear-btn {
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.mef-merge-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    min-width: 220px;
}

.mef-merge-btn:hover {
    background: linear-gradient(135deg, #27ae60, #219653);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.3);
}

.mef-clear-btn {
    background: #ecf0f1;
    color: #7f8c8d;
    min-width: 150px;
}

.mef-clear-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.2);
}

.mef-btn-icon {
    font-size: 20px;
}

.mef-progress {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 40px 0;
    border: 1px solid #e1e8ed;
}

.mef-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.mef-progress-header h3 {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
}

#mefProgressPercent {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
}

.mef-progress-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.mef-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.5s ease;
}

.mef-progress-text {
    text-align: center;
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
}

.mef-result {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 40px 0;
    border: 1px solid #e1e8ed;
}

.mef-result.success {
    border-left: 6px solid #2ecc71;
}

.mef-result.error {
    border-left: 6px solid #e74c3c;
}

.mef-result h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mef-result p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mef-result a.button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.mef-result a.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

.mef-info-box {
    background: linear-gradient(135deg, #f8f9fa, #e8f4fc);
    border-radius: 12px;
    padding: 40px;
    margin-top: 50px;
    border: 2px solid #3498db;
}

.mef-info-box h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mef-info-content {
    font-size: 16px;
    line-height: 1.7;
    color: #2c3e50;
}

.mef-success-note {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #155724;
}

.mef-warning-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
}

.mef-warning-note pre {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
    margin: 10px 0;
}

.mef-warning-note code {
    font-family: monospace;
    background: #f8f9fa;
    padding: 2px 4px;
    border-radius: 3px;
}

.mef-features {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 25px 0;
}

.mef-features h4 {
    font-size: 18px;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.mef-features ul {
    margin: 0;
    padding-left: 20px;
    columns: 2;
}

.mef-features li {
    margin-bottom: 10px;
    break-inside: avoid;
    color: #27ae60;
    font-weight: 500;
}

.mef-note {
    padding: 15px;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    margin: 20px 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mef-container {
        padding: 20px 15px;
    }
    
    .mef-header h1 {
        font-size: 28px;
    }
    
    .mef-upload-section,
    .mef-options-section,
    .mef-progress,
    .mef-result,
    .mef-info-box {
        padding: 25px 20px;
    }
    
    .mef-dropzone {
        padding: 30px 20px;
    }
    
    .mef-dropzone-icon {
        font-size: 48px;
    }
    
    .mef-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .mef-merge-btn,
    .mef-clear-btn {
        width: 100%;
        min-width: auto;
    }
    
    .mef-features ul {
        columns: 1;
    }
    
    .mef-radio-label,
    .mef-checkbox-label {
        padding: 15px;
    }
}

/* Loading state */
.mef-loading .mef-dropzone-inner {
    opacity: 0.7;
}

.mef-loading .mef-dropzone-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hide checkboxes/radio buttons */
.mef-radio-label input[type="radio"],
.mef-checkbox-label input[type="checkbox"] {
    display: none;
}
