/* ============================================
   JSON-HIGHLIGHT.CSS - JSON Syntax Highlighting
   Visual syntax highlighting for JSON
   ============================================ */

/* JSON Editor Container */
.json-editor-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.json-editor-container {
    background: #1E1E1E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

/* Toolbar Styling */
.json-toolbar {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #2D2D30 0%, #252526 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.json-toolbar-btn {
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-system);
}

.json-toolbar-btn:hover {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: white;
    border-color: rgba(0, 122, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

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

.json-toolbar-btn i {
    font-size: 11px;
}

/* JSON Editor Textarea */
.json-editor {
    font-family: 'Consolas', 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 16px;
    background: #1E1E1E;
    color: #D4D4D4;
    border: none;
    resize: vertical;
    min-height: 300px;
    width: 100%;
    overflow: auto;
    tab-size: 2;
    -moz-tab-size: 2;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.json-editor::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.json-editor::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.json-editor::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
}

.json-editor::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.json-editor:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(0, 122, 255, 0.5);
}

.json-editor::placeholder {
    color: #6A9955;
}

/* Visual Validation Indicator */
.json-editor[data-valid="true"] {
    border-left: 3px solid #4EC9B0;
}

.json-editor[data-valid="false"] {
    border-left: 3px solid #F48771;
}

/* Line Numbers (Optional Enhancement) */
.json-editor-with-lines {
    display: flex;
}

.json-line-numbers {
    padding: 16px 12px 16px 16px;
    background: #252526;
    color: #858585;
    font-family: 'Consolas', 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    text-align: right;
    user-select: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Syntax Color Scheme (VS Code Dark+ inspired) */
.json-key {
    color: #9CDCFE;
}

.json-string {
    color: #CE9178;
}

.json-number {
    color: #B5CEA8;
}

.json-boolean {
    color: #569CD6;
}

.json-null {
    color: #569CD6;
}

.json-bracket {
    color: #FFD700;
}

/* Status Indicator */
.json-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #252526;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-system);
}

.json-status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #858585;
}

.json-status-icon.valid {
    background: #4EC9B0;
    box-shadow: 0 0 8px rgba(78, 201, 176, 0.5);
}

.json-status-icon.invalid {
    background: #F48771;
    box-shadow: 0 0 8px rgba(244, 135, 113, 0.5);
}

/* Compact Mode */
.json-editor.compact {
    min-height: 150px;
    font-size: 12px;
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .json-editor-container {
        border-color: rgba(255, 255, 255, 0.12);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .json-toolbar {
        flex-wrap: wrap;
        padding: 8px;
    }
    
    .json-toolbar-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .json-toolbar-btn span {
        display: none;
    }
    
    .json-editor {
        font-size: 12px;
        padding: 12px;
        min-height: 200px;
    }
}

