/**
 * [Senior Standard] JSON Viewer Style v3.8
 * Features: Syntax Highlighting, Tree View, Responsive Layout
 */

.json-app-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* Config Panel */
.config-panel {
    background: #fff;
    padding: 20px;
}
.panel-header { margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }
.panel-header h3 { margin: 0 0 5px 0; font-size: 1.1rem; color: #1e293b; }
.panel-header p { margin: 0; font-size: 0.9rem; color: #64748b; }

.fetcher-grid {
    display: flex;
    gap: 10px;
}
.input-pastel {
    flex: 1;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* Main Layout */
.json-main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 70vh;
}

.h-100 { height: 100%; display: flex; flex-direction: column; }

/* Editor Section */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.json-textarea {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    resize: none;
    background: #f8fafc;
    color: #334155;
    line-height: 1.5;
}
.json-textarea:focus { outline: 2px solid #3b82f6; background: #fff; }

.validator-status {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}
.validator-status.error { color: #ef4444; }
.validator-status.success { color: #10b981; }

/* Viewer Section */
.viewer-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.viewer-tabs {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    border-bottom: 3px solid transparent;
}
.tab-btn.active {
    background: #fff;
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.viewer-content {
    flex: 1;
    overflow: auto;
    padding: 15px;
    display: none;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
}
.viewer-content.active { display: block; }

/* Tree View Styling */
.tree-container {
    color: #334155;
}
.jv-node { margin-left: 20px; }
.jv-key { color: #8b5cf6; font-weight: 600; cursor: pointer; }
.jv-val { color: #059669; }
.jv-val.string { color: #d97706; }
.jv-val.bool { color: #db2777; }
.jv-val.null { color: #94a3b8; }

/* Path Finder Footer */
.path-finder-footer {
    padding: 10px 15px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}
.path-finder-footer code {
    background: #e2e8f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    color: #334155;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.btn-copy {
    background: none; border: none; cursor: pointer; font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .json-main-layout { grid-template-columns: 1fr; height: auto; }
    .json-textarea { min-height: 300px; }
    .viewer-card { min-height: 400px; }
}
