﻿/* JSON to X++ Converter Styles */

.converter-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f0 100%);
    min-height: 100vh;
}

.converter-header {
    margin-bottom: 2rem;
}

    .converter-header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        color: #1a202c;
        margin-bottom: 0.5rem;
    }

    .converter-header p {
        font-size: 1rem;
        color: #718096;
    }

.converter-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .converter-main {
        grid-template-columns: 1fr;
    }
}

/* Editor Sections */
.input-section {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 650px; /* veya ihtiyacına göre px/% */
}
.output-section {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 650px; /* veya ihtiyacına göre px/% */
    display: flex;
    flex-direction: column;
}

/* Editor Header */
.editor-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.output-header {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
}

.editor-traffic-lights {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

    .light.red {
        background-color: #fc5c65;
    }

    .light.yellow {
        background-color: #fed330;
    }

    .light.green {
        background-color: #26de81;
    }

.editor-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    margin-left: 1rem;
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear {
    background-color: #e53e3e;
    color: #ffffff;
}

    .btn-clear:hover {
        background-color: #c53030;
    }

.btn-convert {
    background-color: #3182ce;
    color: #ffffff;
}

    .btn-convert:hover {
        background-color: #2c5aa0;
    }

.btn-copy {
    background-color: #38a169;
    color: #ffffff;
}

    .btn-copy:hover {
        background-color: #2f855a;
    }

.btn:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

/* Editor Content */
.editor-content {
    padding: 1.5rem;
    flex: 1; /* header dışında kalan alanı kapla */
    overflow-y: auto; /* scroll aktif olsun */
}

.json-textarea {
    min-width: 100%;
    min-height: 550px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    border: 2px solid #cbd5e0;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f7fafc;
    resize: vertical;
    line-height: 1.6;
}

    .json-textarea:focus {
        outline: none;
        border-color: #3182ce;
        background-color: #ffffff;
    }

/* Validation Message */
.validation-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: none;
}

    .validation-message.valid {
        background-color: #f0fff4;
        color: #22543d;
        border-left: 4px solid #38a169;
    }

    .validation-message.invalid {
        background-color: #fff5f5;
        color: #742a2a;
        border-left: 4px solid #e53e3e;
    }

/* X++ Code Editor */
.xpp-code-editor {
    width: 100%;
    min-height: 550px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    background-color: #1e1e1e;
    color: #d4d4d4;
    border: 2px solid #2d3748;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow: auto;
    line-height: 1.4;
    white-space: pre;
    margin: 0;
}

    .xpp-code-editor code {
        color: #6b7280;
    }

/* X++ Syntax Highlighting */
.xpp-comment {
    color: #6a9955;
    font-style: italic;
}

.xpp-keyword {
    color: #569cd6;
    font-weight: 600;
}

.xpp-attribute {
    color: #4ec9b0;
}

.xpp-string {
    color: #ce9178;
}

.xpp-number {
    color: #b5cea8;
}

.xpp-function {
    color: #dcdcaa;
    font-weight: 500;
}

/* Instructions Section */
.instructions-section {
    background: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

    .instructions-section h2 {
        font-size: 1.875rem;
        font-weight: 700;
        color: #1a202c;
        margin-bottom: 1.5rem;
    }

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .instructions-grid {
        grid-template-columns: 1fr;
    }
}

.instruction-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.instruction-number {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
    color: #ffffff;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.instruction-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.instruction-content p {
    font-size: 0.875rem;
    color: #718096;
}

/* Icons (using simple CSS shapes) */
.icon-trash::before {
    content: "🗑";
}

.icon-play::before {
    content: "▶";
}

.icon-copy::before {
    content: "📋";
}

.icon-check::before {
    content: "✓";
}

.icon-alert::before {
    content: "⚠";
}

/* Validation Badge in Header */
.validation-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 1rem;
    max-width: 350px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .validation-badge.valid {
        background-color: rgba(16, 185, 129, 0.2);
        color: #d4f4e4;
        border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .validation-badge.invalid {
        background-color: rgba(239, 68, 68, 0.2);
        color: #fecaca;
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

/* Header Left Section */
.header-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
