/* JSON Tools Shared Styles */
.json-tools-container {
    max-width: 1200px;
}

.json-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 1.5rem !important;
}

.json-textarea {
    width: 100%;
    min-height: 350px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.json-textarea:focus {
    outline: none;
    border-color: var(--bs-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.json-output-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fdfdfd;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.json-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#json-output {
    padding: 1.25rem;
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    flex-grow: 1;
    margin-bottom: 0;
}

.json-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn-json {
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

/* Syntax Highlighting */
.jt-key { color: #c23e99; }
.jt-string { color: #2e7d32; }
.jt-number { color: #e65100; }
.jt-boolean { color: #1565c0; }
.jt-null { color: #757575; }

/* Dark Mode Overrides */
[data-bs-theme="dark"] .json-card {
    background: rgba(33, 37, 41, 0.7);
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .json-textarea {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

[data-bs-theme="dark"] .json-output-container {
    background: #121212;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .json-output-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .jt-key { color: #f06292; }
[data-bs-theme="dark"] .jt-string { color: #81c784; }
[data-bs-theme="dark"] .jt-number { color: #ffb74d; }
[data-bs-theme="dark"] .jt-boolean { color: #64b5f6; }
[data-bs-theme="dark"] .jt-null { color: #9e9e9e; }

/* Data Intelligence Cards */
.metric-card {
    transition: transform 0.2s;
}
.metric-card:hover {
    transform: translateY(-2px);
}

.json-textarea-viewer {
    min-height: 400px;
    font-family: monospace;
}

.json-output-viewer {
    min-height: 400px;
    overflow: auto;
}

.metric-label-small {
    font-size: 0.65rem;
}