/* Excel to JSON Converter Styles */
.excel-json-converter {
    margin-top: 2rem;
}

.converter-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Panel Styles */
.input-panel,
.output-panel {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.input-panel:hover,
.output-panel:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Input Panel Content */
.input-panel-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
}

.upload-section {
    flex-shrink: 0;
}

.options-section {
    border-top: 1px solid #e9ecef;
    padding-top: 1.25rem;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
}

.input-panel .panel-header {
    padding: 1rem 1.5rem;
}

.header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    flex-shrink: 0;
}

.header-content {
    flex: 1;
    min-width: 0;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #212529;
}

.input-panel .panel-title {
    font-size: 1.125rem;
}

.panel-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

.input-panel .panel-subtitle {
    font-size: 0.8125rem;
}

.header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Upload Zone */
.upload-zone {
    position: relative;
    margin: 1.5rem;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-zone.dragover {
    border-color: #667eea;
    background: #e8edff;
    transform: scale(1.02);
}

.upload-zone-content {
    padding: 3rem 2rem;
    text-align: center;
    pointer-events: none;
}

.upload-icon {
    color: #667eea;
    margin: 0 auto 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.5rem 0;
}

.upload-hint {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
}

.upload-formats {
    font-size: 0.75rem;
    color: #adb5bd;
    margin: 0;
}

.upload-progress {
    padding: 1.5rem 1rem;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

/* File Info Card - Compact */
.file-info-card {
    margin-top: 1rem;
    padding: 0.875rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.file-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    color: #667eea;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 2px 0;
    word-break: break-word;
}

.file-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
}

.remove-file-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.remove-file-btn:hover {
    background: #e9ecef;
    color: #dc3545;
}

/* Options Section - Compact */
.options-header {
    margin-bottom: 1rem;
}

.options-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.options-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option-row-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.option-label-compact {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #495057;
    min-width: 60px;
}

.label-text {
    display: block;
}

.option-select-compact {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #ffffff;
    color: #212529;
    transition: all 0.2s ease;
    cursor: pointer;
}

.option-select-compact:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.option-select-compact:disabled {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
}

.options-checkboxes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.option-checkbox-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.option-checkbox-compact:hover {
    background: #f8f9fa;
}

.option-checkbox-compact input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #667eea;
}

.checkbox-text {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #495057;
    user-select: none;
}

/* Convert Button - Compact */
.convert-btn {
    width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    margin-top: 0.5rem;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.convert-btn:active:not(:disabled) {
    transform: translateY(0);
}

.convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Output Panel */
.output-panel .panel-header {
    justify-content: space-between;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #667eea;
    background: #f0f4ff;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover:not(:disabled) {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.output-content {
    position: relative;
    min-height: 300px;
    max-height: 600px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .output-panel {
        display: flex;
        flex-direction: column;
    }

    .output-content {
        flex: 1;
        min-height: 400px;
        max-height: none;
        overflow: auto;
    }
}

@media (min-width: 1024px) {
    .output-content {
        min-height: 500px;
    }
}

.json-editor {
    width: 100%;
    height: 100%;
    min-height: 300px;
    font-size: 14px;
}

.output-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: #adb5bd;
    text-align: center;
    pointer-events: none;
}

.output-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 1rem;
    font-weight: 500;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
}

.placeholder-hint {
    font-size: 0.875rem;
    color: #adb5bd;
    margin: 0;
}

.output-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.footer-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    font-size: 0.8125rem;
    color: #6c757d;
    padding: 0.25rem 0.75rem;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Mobile Responsive */
@media (min-width: 768px) {
    .converter-layout {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .input-panel {
        grid-column: 1;
    }

    .output-panel {
        grid-column: 2;
        grid-row: 1;
    }

    .options-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .converter-layout {
        gap: 2rem;
    }

    .input-panel-content {
        padding: 1.75rem;
    }
}

@media (max-width: 767px) {
    .panel-header {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .input-panel .panel-header {
        padding: 0.875rem 1rem;
    }

    .header-icon {
        width: 36px;
        height: 36px;
    }

    .panel-title {
        font-size: 1.125rem;
    }

    .input-panel .panel-title {
        font-size: 1rem;
    }

    .panel-subtitle {
        font-size: 0.8125rem;
    }

    .input-panel-content {
        padding: 1rem;
        gap: 1rem;
    }

    .upload-zone-content {
        padding: 1.25rem 0.75rem;
    }

    .upload-icon svg {
        width: 36px;
        height: 36px;
    }

    .upload-title {
        font-size: 0.875rem;
    }

    .options-checkboxes {
        grid-template-columns: 1fr;
    }

    .header-actions {
        width: 100%;
        margin-top: 0.75rem;
        justify-content: flex-end;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
    }

    .output-content {
        min-height: 250px;
        max-height: 400px;
    }

    .json-editor {
        min-height: 250px;
    }
}

/* ACE Editor Customization */
.ace-github {
    background: #ffffff !important;
}

.ace-github .ace_gutter {
    background: #f8f9fa !important;
    border-right: 1px solid #e9ecef !important;
}

.ace-github .ace_gutter-active-line {
    background: #f0f4ff !important;
}

.ace-github .ace_cursor {
    color: #667eea !important;
}

.ace-github .ace_selection {
    background: #e8edff !important;
}

.ace-github .ace_error {
    display: none !important;
}
