/* Schema Converter Wrapper */
.schema-converter-wrapper {
    margin-bottom: 2rem;
}

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

/* Section Styles */
.input-section,
.output-section {
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

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

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--header-bg, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e9ecef);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary, #212529);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color, #e9ecef);
    border-radius: 8px;
    color: var(--text-secondary, #6c757d);
    cursor: pointer;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--hover-bg, #f8f9fa);
    border-color: var(--primary-color, #007bff);
    color: var(--primary-color, #007bff);
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(0);
}

.icon-btn svg {
    display: block;
}

/* Input/Output Containers */
.input-container,
.output-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 500px;
}

.json-editor {
    flex: 1;
    width: 100%;
    padding: 1.25rem;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary, #212529);
    background: var(--editor-bg, #ffffff);
    border: none;
    resize: none;
    outline: none;
    overflow-y: auto;
}

.json-editor:focus {
    background: var(--editor-focus-bg, #fafbfc);
}

.json-editor::placeholder {
    color: var(--text-muted, #adb5bd);
    font-style: italic;
}

.json-editor[readonly] {
    background: var(--editor-readonly-bg, #f8f9fa);
    cursor: default;
}

/* Input Footer */
.input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--footer-bg, #f8f9fa);
    border-top: 1px solid var(--border-color, #e9ecef);
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #ffffff;
    background: var(--primary-color, #007bff);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    background: var(--primary-hover, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    display: flex;
    align-items: center;
}

.btn-icon svg {
    display: block;
}

.status-indicator {
    font-size: 0.8125rem;
    color: var(--text-muted, #6c757d);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    background: transparent;
    transition: all 0.2s ease;
}

.status-indicator.success {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.status-indicator.error {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Options Panel */
.options-panel {
    padding: 1.25rem 1.5rem;
    background: var(--options-bg, #f8f9fa);
    border-bottom: 1px solid var(--border-color, #e9ecef);
}

.option-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.option-row:last-child {
    margin-bottom: 0;
}

.option-row.checkbox-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
}

.option-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary, #495057);
}

.option-input,
.option-select {
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    color: var(--text-primary, #212529);
    background: #ffffff;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease;
}

.option-input:focus,
.option-select:focus {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.option-select {
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color, #007bff);
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-secondary, #495057);
}

/* Output Footer */
.output-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    background: var(--footer-bg, #f8f9fa);
    border-top: 1px solid var(--border-color, #e9ecef);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .converter-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .input-container,
    .output-container {
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .schema-converter-wrapper {
        margin-top: 1.5rem;
    }

    .converter-grid {
        gap: 1rem;
    }

    .section-header {
        padding: 1rem 1.25rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }

    .icon-btn svg {
        width: 16px;
        height: 16px;
    }

    .json-editor {
        padding: 1rem;
        font-size: 13px;
    }

    .input-container,
    .output-container {
        min-height: 300px;
    }

    .input-footer,
    .output-footer {
        padding: 0.875rem 1.25rem;
    }

    .primary-btn {
        padding: 0.5625rem 1rem;
        font-size: 0.875rem;
    }

    .options-panel {
        padding: 1rem 1.25rem;
    }

    .option-row {
        margin-bottom: 0.875rem;
    }

    .option-row.checkbox-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .option-input,
    .option-select {
        padding: 0.5625rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .section-header {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .json-editor {
        padding: 0.875rem;
        font-size: 12px;
    }

    .input-container,
    .output-container {
        min-height: 250px;
    }

    .input-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .primary-btn {
        width: 100%;
        justify-content: center;
    }

    .status-indicator {
        text-align: center;
    }
}

/* Scrollbar Styling */
.json-editor::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.json-editor::-webkit-scrollbar-track {
    background: transparent;
}

.json-editor::-webkit-scrollbar-thumb {
    background: var(--scrollbar-color, #cbd5e0);
    border-radius: 4px;
}

.json-editor::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-hover, #a0aec0);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-indicator.success,
.status-indicator.error {
    animation: fadeIn 0.3s ease;
}
