/* Shared JSON Editor styles (non-isolated) */

/* Buttons */
.json-btn {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s;
}

.json-btn:hover {
    background: #f3f4f6;
}

.json-btn-active {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.json-btn-active:hover {
    background: #2563eb;
}

.json-btn-add {
    margin-top: 8px;
    border-style: dashed;
    color: #3b82f6;
    border-color: #93c5fd;
}

.json-btn-add:hover {
    background: #eff6ff;
}

.json-btn-danger {
    color: #dc2626;
    border-color: #fca5a5;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.json-btn-danger:hover {
    background: #fef2f2;
}

/* Fields */
.json-field {
    margin-bottom: 16px;
}

.json-field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.json-field-label-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.json-field-required {
    color: #dc2626;
}

.json-field-description {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.json-field-input {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.json-field-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.json-field-error {
    display: block;
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 4px;
}

/* Object nesting */
.json-object-content {
    border-left: 3px solid #e5e7eb;
    padding-left: 16px;
    margin-top: 8px;
}

/* Array */
.json-array-items {
    margin-top: 8px;
}

.json-array-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    background: #fafafa;
}

.json-array-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.json-array-item-index {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
}

/* Raw editor */
.json-raw-editor {
    width: 100%;
}

.json-raw-textarea {
    width: 100%;
    padding: 12px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #1e1e2e;
    color: #cdd6f4;
    resize: vertical;
    box-sizing: border-box;
    line-height: 1.5;
    tab-size: 2;
}

.json-raw-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.json-raw-error {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    color: #dc2626;
    font-size: 0.8125rem;
}

/* Visual editor */
.json-visual-editor {
    /* container for all fields */
}
