/* JSON Generator Styles */

/* JSON block container */
.json-output {
    background: #1a1a2e;
    border: 1px solid #f7df1e40;
    border-radius: 8px;
    margin: 20px 0;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(247, 223, 30, 0.1);
}

/* JSON header with type indicator */
.json-header {
    background: rgba(247, 223, 30, 0.1);
    padding: 8px 15px;
    border-bottom: 1px solid #f7df1e40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.json-type-badge {
    color: #f7df1e;
    font-weight: bold;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.json-type-badge .bracket {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1.1em;
}

.json-variation-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 10px;
}

.json-copy-btn {
    background: rgba(247, 223, 30, 0.1);
    border: 1px solid #f7df1e;
    color: #f7df1e;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.json-copy-btn:hover {
    background: rgba(247, 223, 30, 0.2);
    border-color: #fff176;
}

.json-copy-btn.copied {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    color: #4CAF50;
}

/* JSON content area */
.json-content {
    padding: 15px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #d4d4d4;
    background: #0d1117;
}

.json-content pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.json-content code {
    font-family: inherit;
    background: transparent;
    padding: 0;
    color: inherit;
}

/* JSON Syntax highlighting */
.json-content .hljs-attr,
.json-content .hljs-property {
    color: #79c0ff;
}

.json-content .hljs-string {
    color: #a5d6ff;
}

.json-content .hljs-number {
    color: #79c0ff;
}

.json-content .hljs-literal {
    color: #ff7b72;
}

.json-content .hljs-punctuation {
    color: #8b949e;
}

/* Validation badge */
.json-validation-badge {
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.json-validation-badge.valid {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.json-validation-badge.invalid {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.4);
}

/* Preview lines for browse view */
.json-preview-lines {
    padding: 15px;
    background: #0d1117;
}

.json-preview-lines .line {
    height: 8px;
    background: linear-gradient(90deg, #f7df1e20 0%, transparent 100%);
    border-radius: 4px;
    margin-bottom: 8px;
}

/* JSON actions */
.json-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.json-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.json-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Format toggle */
.json-format-toggle {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
    border-radius: 4px;
}

.json-format-toggle button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
}

.json-format-toggle button.active {
    background: rgba(247, 223, 30, 0.2);
    color: #f7df1e;
}

.json-format-toggle button:hover:not(.active) {
    color: #fff;
}

/* Scrollbar styling */
.json-content::-webkit-scrollbar {
    height: 8px;
    background: rgba(247, 223, 30, 0.1);
}

.json-content::-webkit-scrollbar-thumb {
    background: rgba(247, 223, 30, 0.3);
    border-radius: 4px;
}

.json-content::-webkit-scrollbar-thumb:hover {
    background: rgba(247, 223, 30, 0.5);
}

/* Loading state */
.json-loading {
    text-align: center;
    padding: 40px;
    color: #f7df1e;
}

.json-loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive */
@media (max-width: 768px) {
    .json-content {
        font-size: 12px;
        padding: 10px;
    }
    
    .json-header {
        padding: 6px 10px;
    }
    
    .json-copy-btn {
        font-size: 0.8em;
        padding: 3px 8px;
    }
}

/* Selection styling */
.json-content ::selection {
    background: rgba(247, 223, 30, 0.3);
}

.json-content ::-moz-selection {
    background: rgba(247, 223, 30, 0.3);
}

